Christian Cantrell wrote:
Hi, all. I'm sure this question has been asked, but I was not able to effectively search the forum archives, so I'm having to ask it again. I'm trying to use the mail function to send email on OS X, but the email gets rejected by the mail server I'm sending to. I get messages in mail.loglike this: "The IP you're using to send email is not authorized to send email directly to our servers." I tried sending mail through another server using the SMTP and smtp_port settings in my php.ini files, but the settings seem to be ignored (perhaps they are Windows only?). Can anyone tell me how I can successfully send test emails on OS X?
They are Windows only.
Also, the From header does seem to be getting successfully set. Is there anything wrong with this code? mail('foo@xxxxxxx', 'php test', 'this is the message.\nthis is another line.', 'From: qantrell@xxxxxxxxx'."\n\r");
This is a problem with the destination mail server rejecting mail from the machine you're sending it from. It has nothing to do with the contents of the email or with PHP. Your best bet is to email postmaster@xxxxxxx (or whatever the real domain you're sending to is) and ask them why your IP cannot send mail to their mail server.
-Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php