473,795 Members | 2,854 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mail() DOESN"T work...

chunk1978
224 New Member
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 2340
chunk1978
224 New Member
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 New Member
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.halleswebde sign.com
Mar 1 '07 #3
chunk1978
224 New Member
HI.!
I have tryed your script.. and it work's very vell for me.. as it is..

Halles
http://www.halleswebde sign.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
1241
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: Worm/NetSky.Z worm The mail was not delivered. Please remove any potential malicious software from your computer before
0
1324
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 address: Worm/NetSky.P.ExplWorm/NetSky.P, Worm/NetSky.P.Expl The mail was not delivered. Your computer may be infected with a virus! Please visit
0
1106
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 address: Worm/NetSky.Z worm The mail was not delivered. Your computer may be infected with a virus! Please visit
3
2289
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 activated by a button on my .aspx page......Thanks, Jason
1
1427
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: www.GroupSrv.com *-----------------------*
3
57673
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 unhandled by user code Message="Failure sending mail." Source="System" StackTrace: at System.Net.Mail.SmtpClient.Send(MailMessage message) at System.Net.Mail.SmtpClient.Send(String from, String
6
1723
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"; $body = 'The first line\n'; $body .= 'The second line.'; $headers = 'From: webmaster@example.com';
2
2577
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 of the emails are failing from being sent to people. Ratio is like 1 in 30 are being failing, I thought it is the mail size issue and I have unchecked the mail size limit on SMTP server. Still I couldn't figure out why few are not going out.
1
3059
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" folder not the actual inbox.... how i can get e-mail sent the clients inbox not in their "Bulk" or "Junk Mail" box thanks my send e-mail page C# codes are below:
0
9522
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10448
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10217
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10167
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9046
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6784
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5566
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2922
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.