You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Patton, Billy N" <bi...@h3net.com> on 2015/06/17 18:54:22 UTC
[users@httpd] email problem.
I'm having a problem sending email from my app.
To simplify at the top of my cp.cgi I added a little code then blocked the rest of my script with _END_ .
Below is my entry cp.cgi
>From a command line if I execute : perl cp.cgi
I'll get an email.
If I bury this within my code, at the desired location, I get nothing, no errors, no email.
I've tried replacing smtp.west.com with the actual IP address, same results.
>From the command line I've checked :
getsebool -a | grep mail
allow_postfix_local_write_mail_spool --> on
httpd_can_sendmail --> on
logging_syslogd_can_sendmail --> on
This is on a VM. We have other VMs able to send email.
It was suggested that it might firewall problem.
>From the command line I can ping the server.
I can put that snippet of code in a file, execute and receive an email.
cp.cgi
=====================
#!/usr/bin/perl
use Mail::Sender::Easy qw (email);
email({'from' => 'bnpatton@west.com',
'to' => 'bnpatton@west.com',
'subject' => 'test',
'smtp' => 'smtp.west.com',
'_text' => 'test email'
});
_END_
...
==================
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org