views:

322

answers:

3

I'm using this CGI script.

CGI is working, but I cannot sent emails from this form in CentOS. Please help me? Do I have to set-up anything for it? or MTA?

+1  A: 

Hm, kind of hard to check. It appears fairly generously commented, unfortunately in Japanese :-/.

From what I can see, it expects you to set variable $server to be a SMTP server that accepts outgoing mail. So you'll need (access to) an SMTP server.

sleske
+1  A: 

You should check sendmail command

$ which sendmail
$ ls /usr/bin/sendmail

and, can you send email with sendmail command?

zegenvs
+1  A: 

Perl comes with excellent documentation that is accessible from the command line using perldoc on your computer. To get help on perldoc:

$ perldoc perldoc

Table of contents

$ perldoc perltoc

Help on a function

$ perldoc -f open

Search FAQ list for a keyword:

$ perldoc -q mail
$ perldoc -q "How do I send mail"

Depending on the OS/distribution combination, an HTML version of the documentation might also be installed. You should skim through the FAQ and the main parts at least once a year, every year.

I do not think it is a good idea for us to download some arbitrary binary posted somewhere. If you are going to post code, post it here. As for your question, the FAQ might help you begin to debug: How do I send mail?

Sinan Ünür