473,402 Members | 2,064 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,402 software developers and data experts.

PHP mail() function sends nothing

helimeef
Hi, I'm running Apache 2 and PHP 5.2.0 on Windows XP Media Center Edition.
My problem is if I write a simple mail program like this:
Expand|Select|Wrap|Line Numbers
  1. if(mail("__MUNGED__","Test Mail","This is a test message from localhost.")) {
  2.     echo "Success";
  3. }
It echos "Success", there are no errors, but nothing gets sent to the email address I specify. Here's what the [mail function] part of php.ini looks like:
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 = __MUNGED__
Thank You,
Steven
Sep 28 '07 #1
5 1825
Atli
5,058 Expert 4TB
Hi Steven.

Do you have an SMTP server on you server?
Do you have a spam filter that could be filtering it out?

Do you have the debug messages turned on?
Are you getting any errors?
Sep 29 '07 #2
ak1dnar
1,584 Expert 1GB
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 = __MUNGED__
you have to assign a real SMTP server name instead of "localhost".
If you are using any mail client such as outlook in your PC, try the SMTP server name same as outlook for php mail. and the port also.
Sep 29 '07 #3
pbmods
5,821 Expert 4TB
Heya, Helimeef.

For your protection, I have removed your email address form your post...

... and Ajaxrand's.

*grumble grumble*
Sep 30 '07 #4
ak1dnar
1,584 Expert 1GB
Heya, Helimeef.

For your protection, I have removed your email address form your post...

... and Ajaxrand's.

*grumble grumble*
I was in a hurry last time. Sorry I think, I missed some threads.
Sep 30 '07 #5
Hi Steven.

Do you have an SMTP server on you server?
Do you have a spam filter that could be filtering it out?

Do you have the debug messages turned on?
Are you getting any errors?
Sorry haven't checked this thread in a while. Answers to your questions:
1. No, don't know how to get one or install one
2. Nope, checked spam
3. AHAH! I didn't have errors turned on.
4. Yes there was.
Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Server\Documents\mail.php on line 2

I've been looking forever for a mail server plugin or anything for apache. Do I have to install one somehow or connect to something like mail.smtp.com? Please help.
Dec 25 '07 #6

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

Similar topics

2
by: Gabriel Afana | last post by:
I have a simple php script to just send email.....When I first load the script in a browser...it sends 2 emails. Why?? The weird thing is then when I refresh the page, it send only one email...I...
16
by: polilop | last post by:
I made a form in which I send the visitor a link to my page but when the visitor gets that link in the mail it dosent send him to the page just says invalid syntax or something like...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
3
by: NurAzije | last post by:
Hi, I have a huge mailling list and want to check which mails are real and which does not exists to reduce the size, is there a function which will check if mail@mailserver.somthing exists or not...
11
by: ColinWard | last post by:
Hi. I have the following code in a module which sends email via Outlook. Option Compare Database Option Explicit ' Declare module level variables Dim mOutlookApp As Outlook.Application Dim...
4
by: tfsmag | last post by:
It acts like it sends, but nothing ever shows up... anything you guys can find glaringly wrong here? Thanks in advance, Jeff Here is the code that is supposed to send the mail. ...
2
by: =?Utf-8?B?Q2FwdGFpbiBEYXZlIQ==?= | last post by:
I wrote some code to send an email with two alternate views: 1) html 2) plain text All the html enabled email clients accept the html just fine and disregard the plain text version. However,...
7
by: mukeshrasm | last post by:
Hi I am no able to send mail and it is giving this error Warning: mail(): SMTP server response: 530 5.7.3 Client was not authenticated in c:\inetpub\wwwroot\eshop\includes\classes\email.php on...
1
maliksleo
by: maliksleo | last post by:
hi i am using the following class for email sending but getting this error "Failure sending mail" Imports System.Net.Mail Public Class MailHelper ''' <summary> ''' Sends an mail...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.