By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,304 Members | 1,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,304 IT Pros & Developers. It's quick & easy.

Mail() DOESN"T work...

chunk1978
100+
P: 224
i keep reading "simply do this with PHPs built-in Mail() function"... wtfever! i've been trying to get this working for a week, and it's still a big mystery...

my PHP script:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $to = "jmattie@sympatico.ca";
  3. $subject = "PHP Mail Test";
  4. $body = "Testing.\n .
  5.         This is a basic text PHP Mail Function test";
  6. $headers .= 'From: no-reply@image_ctrl.ca' . "\n";
  7. if (mail($to, $subject, $body, $headers)) {       
  8.   echo("<p>Mail sent to $to</p>");
  9.  } else {                 
  10.   echo("<p>Message delivery failed</p>");
  11.  }
  12. ?>
  13.  
my PHP.ini [i'm using MAC OS X (unix)]
Expand|Select|Wrap|Line Numbers
  1. [mail function]
  2. ; For Win32 only.
  3. SMTP = localhost
  4. smtp_port = 25
  5.  
  6. ; For Win32 only.
  7. sendmail_from = me@example.com
  8.  
  9. ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
  10. sendmail_path = "/usr/sbin/sendmail -t -i"
  11.  
  12. ; Force the addition of the specified parameters to be passed as extra parameters
  13. ; to the sendmail binary. These parameters will always replace the value of
  14. ; the 5th parameter to mail(), even in safe mode.
  15. ;mail.force_extra_parameters =
  16.  
the problem is that it keeps echoing that the mail has been sent, but i never receive anything... WHY isn't this working?

please help... this is driving me crazy.

thanks
Feb 28 '07 #1
Share this Question
Share on Google+
3 Replies


chunk1978
100+
P: 224
hi again... sorry to keep this discussion up... but i'd like to add that in my mail.log i found this:

Expand|Select|Wrap|Line Numbers
  1. Feb 28 21:35:25 jmattie-computer postfix/smtp[716]: connect to mxmta.sympatico.ca[67.69.240.19]: Operation timed out (port 25)
  2.  
honestly, i have no idea what that means exactly? all i understand is "Operation timed out"...

the mystery continues... unfortunately...

any ideas would be greatly appreciated...
Mar 1 '07 #2

P: 7
hi again... sorry to keep this discussion up... but i'd like to add that in my mail.log i found this:

Expand|Select|Wrap|Line Numbers
  1. Feb 28 21:35:25 jmattie-computer postfix/smtp[716]: connect to mxmta.sympatico.ca[67.69.240.19]: Operation timed out (port 25)
  2.  
honestly, i have no idea what that means exactly? all i understand is "Operation timed out"...

the mystery continues... unfortunately...

any ideas would be greatly appreciated...
HI.!
I have tryed your script.. and it work's very vell for me.. as it is..

Halles
http://www.halleswebdesign.com
Mar 1 '07 #3

chunk1978
100+
P: 224
HI.!
I have tryed your script.. and it work's very vell for me.. as it is..

Halles
http://www.halleswebdesign.com
hey halles,

the script works fine on windows environments... but the problem is trying to configure it all to work with Mac OS 10.4, which uses "postfix" instead of "sendmail"... it's confusing...
Mar 1 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.