Page 1 of 1
urgent help needed in configure php.ini for sending MAIL
Posted: Sun Sep 04, 2005 7:38 pm
by prince09
Hi to all,
I am new to PHP and i want to send simple e-mail using php's mail function. And i get the following error message:
PHP Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in C:\Inetpub\wwwroot\_debug_tmp.php on line 9
For that I configure the PHP.INI at C:\WINDOWS in this way.
[mail function]
; For Win32 only.
SMTP = 127.0.0.1
smtp_port = 25
; For Win32 only.
;sendmail_from =
xyz@abc.com
I am running this code on server and i don't know how to configure SMTP server to send mail?? Can you please help me for this...
Posted: Sun Sep 04, 2005 8:16 pm
by josh
remove the semi colon infront of sendmail_from, and change it to your email address.
Posted: Mon Sep 05, 2005 2:59 pm
by prince09
jshpro2 wrote:remove the semi colon infront of sendmail_from, and change it to your email address.
I remove the semi colon and now it gives this error:
PHP Warning: mail(): Failed to connect to mailserver at "130.207.218.151" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Inetpub\wwwroot\_debug_tmp.php on line 9
Can anyone plz guide me how to configure SMTP server on Windows XP?
Thanx in advance.
Posted: Mon Sep 05, 2005 3:02 pm
by josh
What MTA are you using?
Also, did you set sendmail_path? if you set sendmail_path PHP will behave as if it is running on UNIX
Posted: Wed Sep 07, 2005 1:12 pm
by prince09
jshpro2 wrote:What MTA are you using?
Also, did you set sendmail_path? if you set sendmail_path PHP will behave as if it is running on UNIX
olaf wrote:hehe.... cool...
Hi, I install SMTP server for Windows 2003 server and now i get this error message:
PHP Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for
chintan_2512@yahoo.com in C:\Inetpub\wwwroot\_debug_tmp.php on line 9
My code is :
<?php
// The message
$message = "Line 1\nLine 2\nLine 3";
// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);
// Send
mail("
chintan_2512@yahoo.com", 'My Subject', $message);
?>
and my php.ini file is:
[mail function]
; For Win32 only.
SMTP = 127.0.0.1
smtp_port = 25
; For Win32 only.
sendmail_from =
gth838t@mail.gatech.edu
Plz tell me what's the wrong with the code?
Thanx in advance.
Posted: Wed Sep 07, 2005 1:19 pm
by feyd
I believe Yahoo doesn't accept relay mails... along with pretty much the rest of the world.
http://help.yahoo.com/help/us/mail/defer/defer-02.html