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. Link to comment https://forums.phpfreaks.com/topic/80575-how-to-configure-smtp-for-mailing-using-php/ 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. Link to comment https://forums.phpfreaks.com/topic/80575-how-to-configure-smtp-for-mailing-using-php/#findComment-408585 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. Link to comment https://forums.phpfreaks.com/topic/80575-how-to-configure-smtp-for-mailing-using-php/#findComment-408589 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 = [email protected] Link to comment https://forums.phpfreaks.com/topic/80575-how-to-configure-smtp-for-mailing-using-php/#findComment-408594 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 = [email protected], 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 Link to comment https://forums.phpfreaks.com/topic/80575-how-to-configure-smtp-for-mailing-using-php/#findComment-408604 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 = "[email protected]"; $txtEmailto = "[email protected]"; $mail_from = "[email protected]"; $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 Link to comment https://forums.phpfreaks.com/topic/80575-how-to-configure-smtp-for-mailing-using-php/#findComment-408605 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.