473,397 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Mail() DOESN"T work...

chunk1978
224 100+
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
3 2318
chunk1978
224 100+
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
halles
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
224 100+
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

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

Similar topics

0
by: AvMailGate | last post by:
* * * * * * * * * * * * * * * AntiVir ALERT * * * * * * * * * * * * * * * This version of AntiVir is licensed and full featured. AntiVir has detected the following in a mail from your address: ...
0
by: Vexira | last post by:
* * * * * * * * * * * * * * * Vexira ALERT * * * * * * * * * * * * * * * This version of Vexira MailArmor is licensed and full featured. Vexira has detected the following in a mail from your...
0
by: VaMailArmor | last post by:
* * * * * * * * * * * * * * * Vexira ALERT * * * * * * * * * * * * * * * This version of Vexira MailArmor is licensed and full featured. Vexira has detected the following in a mail from your...
3
by: Jason Steeves | last post by:
I need to replicate the code that is found in Internet Explorer File->send page by e-mail. Can someone tell me how to replicate this code or just call this function. I need to program it to be...
1
by: sunnyz | last post by:
i am using property in Webservice.But attribute doesn' work for properties.Cud any1 tell me plz which attribute to use for properties thx *-----------------------* Posted at:...
3
by: HoustonComputerGuy | last post by:
I am working on getting my web applications moved to .Net 2.0 and am having some problems with System.Net.Mail. I get the following error when sending the mail: System.Net.Mail.SmtpException was...
6
by: Kurda Yon | last post by:
Hi everybody, I have a problem with the function "mail". It returns "true" but supposed recipients receive nothing. My code is as follows: $to = $form; $subject = "E-mail Verification";...
2
by: shil | last post by:
Hi all, I'm using System.Net.Mail (Framework 2.0) to send emails on scheduled basis. This works great on Windows 2000 server. Rently we have upgraded our servers to Windows 2003. Since then some...
1
by: =?Utf-8?B?VGFsYWxTYWxlZW0=?= | last post by:
i have facility in my website which sends an e-mail to the cleint's inbox..... i am getting a problem when ever i sends an e-mail.. i tried with Hotmail and Yahoo, e-mail goes to the "Junk Mail"...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.