Hemalatha Posted December 7, 2007 Share Posted December 7, 2007 hello, I need to send mail using php Mail(), 1. Our php(I my office) is connect to a remote sever ip is (192.168.5.250). 2. My machine is SMTP enabled. 3. php.ini file is changed in the server folder as per the requirement. but i could not send the mail. plz help me how and where to configure smtp and php.ini file and wat are the other requirement. Quote Link to comment Share on other sites More sharing options...
revraz Posted December 7, 2007 Share Posted December 7, 2007 Look in the PHP.INI file for the SMTP Key. Quote Link to comment Share on other sites More sharing options...
Hemalatha Posted December 7, 2007 Author Share Posted December 7, 2007 I searched for the PHP.ini file but i dont knw wat value to be given for smtp directives. Quote Link to comment Share on other sites More sharing options...
revraz Posted December 7, 2007 Share Posted December 7, 2007 [mail function] SMTP = 192.168.5.250 smpt_port = 25 sendmail_from = your.email@domain.com Quote Link to comment Share on other sites More sharing options...
Hemalatha Posted December 7, 2007 Author Share Posted December 7, 2007 Thank u very much for the code i need one more clarification 1. our php core is installed in the server IP : 192.168.5.250 is it correct to give this IP address in that INI file for SMTP directive. 2. U have given like send mail_from = your.email@domain.com, We have edurao mail client for receiving mail from out client do i have to given that address or my personal mail address 3. give me some examples for send mail_from Waiting for u r reply Quote Link to comment Share on other sites More sharing options...
Hemalatha Posted December 7, 2007 Author Share Posted December 7, 2007 I have the following code <?php // $to = "jose@laserwords.com"; $txtEmailto = "software@laserwords.com"; $mail_from = "software@laserwords.com"; $txtSub = "Hello"; $mail_mesg = "Testing for Mail"; //Check whether the submission is made if(isset($hidSubmit)) { //Declarate the necessary variables $mail_to=$txtEmailto; $mail_from=$txtEmailfrm; $mail_sub=$txtSub; $mail_mesg=$txtMsg; //Check for success/failure of delivery if(mail($mail_to,$mail_sub,$mail_mesg,"From:$mail_from/r/nReply-to:$mail_from")) echo "<span class='textred'>E-mail has been sent successfully from $mail_sub to $mail_to</span>"; else echo "<span class='textred'>Failed to send the E-mail from $mail_sub to $mail_to</span>"; } else print "submission not made"; ?> OUTPUt : Submission not made HELP ME Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.