Re: Sending mail on OS X
| From: | Frank Arensmeier | Date: | Sat, 09 Jun 2007 19:22:55 +0000 |
| Subject: | Re: Sending mail on OS X | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-256453@lists.php.net to get a copy of this message | ||
I think the key to your problem is to configure Postfix on Mac OS X properly. My best suggestion would be "Postfix Enabler" (look at e.g. versiontracker.com for the current version). Postfix Enabler makes it very easy to setup Postfix for exemple to use SMTP for the outgoing mails.
Another idea would be to use phpmailer (http://phpmailer.sourceforge.net/).
//frank
9 jun 2007 kl. 06.04 skrev Christian Cantrell:
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? Also, the From header does seem to be getting successfully set. Is there anything wrong with this code? mail('foo@bar.com', 'php test', 'this is the message.\nthis is another line.', 'From: qantrell@yahoo.com'."\n\r"); Thanks, Christian