OS need anything for mail() to work?
I'm running Smartpill on 10.5.2 on FM 9.0v3, and using the following code:
ini_set('sendmail_from','address@mydomain.com');
ini_set('SMTP','working.server.com');
mail('brian@mydomain.com', 'Subject', 'Message');
The servers and addresses are KNOWN TO WORK, I use this same code and same info on a number of different web servers around the world. Authentication is absolutely not the problem.
But when I run this code from Smartpill, it works on other peoples' computers, but it doesn't work on mine. I get no error, but no email is ever sent.
To test, I have the default PHP install running on my Mac, and when I turn on Web Sharing I can run a simple PHP page using that same code. When it runs on my Mac, no error is received, but no email is sent. When I upload that page to a different server, the email is sent fine.
So my question: Is there something that needs to be installed, running, or otherwise configured on a user's computer to make sure Smartpill (or PHP) can send emails? Is there a way I could test for this from the FileMaker script?
OS need anything for mail() to work?
Hello Brian,
I've seen similar cases where the mail function thinks the mail was sent but it's not. It may be that it connected to the server and had what it thinks is a successful session, but I'm not sure and haven't taken the time to get to the bottom of it.
A couple of things to try: 1) use ini_get to verify that your settings are being set; 2) make the ini changes in the php.ini file and put this file in the PHP Support folder (restart required) - there's a starter copy of the php.ini included with the download.
We're using the PHP Mailer class for our email because it has many more capabilities:
http://sourceforge.net/projects/phpmailer
Regards,
Micah