I am working on a project that needs to send mail to post master general. The function sends mail correctly to myself and other email addresses, but does not send to pmg. Sendmail is "sendmail -t -i" on my Linux server.
Here's the PHP code (this does not work):
$email_body ="X-PMG-Userid: sflc\n";
$email_body.="X-PMG-Recipient: sflctest@yahoo.com\n";
$email_body.="X-PMG-Silent: 1\n";
$email_body.="X-PMG-IP: $ip\n";
mail ( "listmanager@subs.postmastergeneral.com",
"subscribe",
$email_body,
"info@sflc.com" );
Here's the CGI code (this works):
# Open a pipe to the sendmail program.
open(MAIL,"|$sendmail -t") || HTML_Error("Cannot run $sendmail");
print(MAIL "From: info@sflc.com\n");
print(MAIL "To: listmanager\@subs.postmastergeneral.com\n");
print(MAIL "Subject: subscribe\n\n");
print(MAIL "X-PMG-Userid: sflc\n");
print(MAIL "X-PMG-Recipient: sflctest@yahoo.com\n");
print(MAIL "X-PMG-Silent: 1\n");
print(MAIL "X-PMG-IP: $ip\n");
close(MAIL);
Anyone have any experience with PMG and mailing to them from a PHP script?
thanks!
- Dave