Click here to Skip to main content

Linux, Apache, MySQL, PHP

   

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page  Show 
  Refresh
AnswerRe: Final Year project PinmemberJosephvObrien23:22 17 Apr '12  
Questioncoding Pinmembermannu4530:44 19 Feb '12  
QuestionRe: coding PinmemberEddy Vluggen5:42 19 Feb '12  
AnswerRe: coding Pinmembervenkatprince3:56 22 Feb '12  
Questionbutton and image on the same page php ?? Pinmembersujandasmahapatra22:14 15 Feb '12  
AnswerRe: button and image on the same page php ?? PinmemberGraham Breach0:03 16 Feb '12  
QuestionPHP mail() configuration PinmemberCodingLover18:31 13 Feb '12  
Hi all,
 
There are so many articles on the web about 'how to send mails in PHP' using the mail function. But actually it gives lots of errors for me. Have a look at the code segment I tried.
 
	$to 		= "to@gmail.com";
	$subject 	= "subject goes here";
	$message 	= "message of the email goes here";
	$from 		= "from@gmail.com";
	$headers 	= "From: $from";
	
	mail($to,$subject,$message,$headers);
	echo "Mail Sent ";
 
When i try the code, gives the following error.
 
Warning: mail() [function.mail]: Failed to connect to mailserver at "smtp.emailsrvr.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in F:\WorkOn\PHP\MyPHPSites\emai_test.php on line 10
 
How can I workaround with this?
 
Thanks in advance.
I appreciate your help all the time...
CodingLover Smile | :)

AnswerRe: PHP mail() configuration PinmvpRichard MacCutchan22:40 13 Feb '12  
GeneralRe: PHP mail() configuration PinmemberCodingLover23:13 13 Feb '12  
GeneralRe: PHP mail() configuration PinmvpRichard MacCutchan23:27 13 Feb '12  
GeneralRe: PHP mail() configuration PinmemberCodingLover23:30 13 Feb '12  
GeneralRe: PHP mail() configuration PinmvpRichard MacCutchan23:36 13 Feb '12  
GeneralRe: PHP mail() configuration PinmemberCodingLover23:43 13 Feb '12  
GeneralRe: PHP mail() configuration Pinmemberjiudingkeji14:06 14 Feb '12  
AnswerRe: PHP mail() configuration Pinmemberjohny1015198122:51 13 Feb '12  
GeneralRe: PHP mail() configuration PinmemberCodingLover23:18 13 Feb '12  
GeneralRe: PHP mail() configuration Pinmemberjohny1015198123:42 13 Feb '12  
Questionlearning perl PinmemberPhiri_code22:22 12 Feb '12  
AnswerRe: learning perl Pinmemberrickumali7:36 13 Feb '12  
GeneralRe: learning perl Pinsussjustinp4:10 14 Feb '12  
AnswerRe: learning perl Pinmemberdpminusa6:17 14 Feb '12  
AnswerRe: learning perl Pinsussthomas michaud3:28 17 Feb '12  
AnswerRe: learning perl Pinmemberjschell7:28 17 Feb '12  
NewsAttention Pinmemberchubibo01022:07 8 Feb '12  
GeneralRe: Attention PinmvpLuc Pattyn1:49 10 Feb '12  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Beta | 2.5.120517.1 | Last Updated 13 May 2012
Copyright © CodeProject, 1999-2012
All Rights Reserved. Terms of Use
Layout: fixed | fluid