473,320 Members | 1,881 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,320 software developers and data experts.

Help with mail using php and apache on windows XP

Hi everybody,
I have been trying to write a simple mail script using PHP and apache
on Windows XP. Eventhough the script is saying that the mail is
successfully sent, I am unable get it in my mailbox(I have given my
mail address in $to). I am using the mail() function and I have made
the following changes in php.ini

[mail function]
; For Win32 only.
SMTP = localhost

smtp_port = 25

; For Win32 only.
sendmail_from = aa*@Comcast.net

CAn anybody help me with this?

Jul 17 '05 #1
3 2237

Karuna wrote:
Hi everybody,
I have been trying to write a simple mail script using PHP and apache
on Windows XP. Eventhough the script is saying that the mail is
successfully sent, I am unable get it in my mailbox(I have given my
mail address in $to). I am using the mail() function and I have made
the following changes in php.ini

[mail function]
; For Win32 only.
SMTP = localhost

smtp_port = 25


Do you have a mail server running on your local machine that is
listening on port 25? If you don't this isn't going to work. You
probably want to put the address of your ISP's mail server there, not
localhost.

Ken

Jul 17 '05 #2
Karuna wrote:
I have been trying to write a simple mail script using PHP and apache
on Windows XP. Eventhough the script is saying that the mail is
successfully sent, I am unable get it in my mailbox(I have given my
mail address in $to). I am using the mail() function and I have made
the following changes in php.ini

[mail function]
; For Win32 only.
SMTP = localhost

smtp_port = 25

; For Win32 only.
sendmail_from = aa*@Comcast.net

CAn anybody help me with this?


If you have a SMTP server installed (and correctly configured) on your
machine, you should have no problem with that php.ini.

But ...

I doubt you have a mail server installed on your machine.
You have to specify an /existing/ mail server for the SMTP entry in
php.ini.

Try putting in SMTP the same server you have for your mail client
(Outlook Express????) and in sendmail_from an address for that server,
eg:

SMTP = example.com
sendmail_from = us**@example.com
--
Mail to my "From:" address is readable by all at http://www.dodgeit.com/
== ** ## !! ------------------------------------------------ !! ## ** ==
TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>)
may bypass my spam filter. If it does, I may reply from another address!
Jul 17 '05 #3

Pedro Graca wrote:
Karuna wrote:
I have been trying to write a simple mail script using PHP and apache on Windows XP. Eventhough the script is saying that the mail is
successfully sent, I am unable get it in my mailbox(I have given my
mail address in $to). I am using the mail() function and I have made the following changes in php.ini

[mail function]
; For Win32 only.
SMTP = localhost

smtp_port = 25

; For Win32 only.
sendmail_from = aa*@Comcast.net

CAn anybody help me with this?
If you have a SMTP server installed (and correctly configured) on

your machine, you should have no problem with that php.ini.

But ...

I doubt you have a mail server installed on your machine.
You have to specify an /existing/ mail server for the SMTP entry in
php.ini.

Try putting in SMTP the same server you have for your mail client
(Outlook Express????) and in sendmail_from an address for that server, eg:

SMTP = example.com
sendmail_from = us**@example.com
--
Mail to my "From:" address is readable by all at http://www.dodgeit.com/ == ** ## !! ------------------------------------------------ !! ## ** == TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>) may bypass my spam filter. If it does, I may reply from another

address!

Are you sure that the mail function return TRUE?

If it is, I found this note on the PHP.net website that said the
following. I hope this helps:

-------------------------------------------
Quote from PHP.net
-------------------------------------------
thomas at nimstad dot com
01-Oct-2004 01:40
Under win32 you must! set sendmail_from in php.ini to solve the
error: "sendmail_from" not set in php.ini or custom "From:" header
missing. Only setting the headers correctly won't do. When set, the
"From:" header will be used :-)
-------------------------------------------
http://us2.php.net/manual/en/function.mail.php
-------------------------------------------

Hope this helps, good luck.

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bruce W...1 | last post by:
In my effort to learn PHP I'm playing with some simple email scripts. They worked a few days ago but they stopped working. The only thing I've done to this Windows 2000 PC in this time was a...
6
by: Tim J. | last post by:
When I send a message using the mail command in PHP some e-mail addresses somehow put two returns in place of one return, so this: $message = "Test Test2" becomes Test
0
by: Jagdeesh | last post by:
Hai Colleagues, I am using Tomcat 4.1.24 and JDK 1.4.0_03 in my winXP machine. I've transferred a set of folders(containing jsp files) into tomcat's webapps directory(to /webapps/bob ,...
11
by: gregsands | last post by:
Hi Im trying to install PHP 5.05 on Windows XP running Apache 2.0.54 Apache is running fine and ive made all the changes to the pnp.ini file and Apache config file, restarted Apache but all I get...
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 -------------------------------------------------------------------------------- ...
0
by: wb5plj | last post by:
Hi I am having a problem passing some sql to the db2cmd via ant. This is very confusing as I am doing this exact thing elseware with no problem (just differant sql, and I have verified the sql is...
11
by: cybervigilante | last post by:
I can't seem to change the include path on my local winmachine no matter what I do. It comes up as includ_path .;C:\php5\pear in phpinfo() but there is no such file. I installed the WAMP package...
2
by: btcoder | last post by:
Hi, my jsp page uses sun.net.smtp.SmtpClient to send email. It worked fine until the hosted location was moved to another server. Now it generates the sun.net.smtp.SmtpProtocolException and the...
6
by: phpmagesh | last post by:
Hi, I am using mail function in my php page, As soon i update the details, i have to send mail to the customer with the updated details, problem is when i send mail it simple through waring msg...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.