Hello, monks
I am having a problem with sendmail on a perlscript on my site. Strange, since I was following all the same examples, here is my sample code:
#!/usr/bin/perl use utf8; use warnings; use strict; use CGI; use Email::Valid; print "Content-type: text/html\n\n"; my $p = CGI->new(); my ($name, $mail, $text) = ($p->param('name'), $p->param('mail'), $p- +>param('text')); if ( $name && $mail && $text ) { if ( Email::Valid->address($mail) ) { #all is set: send to my mail open(MAIL, '|/usr/sbin/sendmail -t') or die("Can`t open sendma +il: $!\n"); print MAIL "Content-type: text/plain\n\n"; print MAIL 'info@difinancial.comdc.net'; print MAIL "From: $mail\n"; print MAIL "Name: $name\n"; print MAIL "Subject: $text"; close(MAIL); print "<h2>Mail send sucessful to 'info\@difinancial.comdc.net +.Thanks for query.</h2>"; } else { print "<p>Mail invalid</p>"; } } else { print "<p>Complete all forms.</p>"; }
There are no errors, I`ve added a check on open(MAIL, '|/usr/sbin/sendmail -t') or die('....'); and the last printing to html document h2 tag is printed, but I don`t recieve any messages on my pointed mail. Any ideas?
You can test it, it`s temporaly set for testing on www.difinancial.comdc.net
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |