yashbhav Posted November 12, 2010 Share Posted November 12, 2010 Hi guys, I am using following code for sending out confirmation email after successful transaction to the user. But, I users are not getting any confirmation emails. Can somebody help me out here. May be I am doing wrong in "$to" function as $sender_email is at previous form, So how can I use Session here? If I am wrong here? Any someone help? Many Thanks in advance. $to = "$sender_email"; $subject = "Your Transaction"; $headers = "From: Company <[email protected]>\n"; $headers .= "Reply-To: Company <[email protected]>\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\n"; $message = "Dear ".$rs["sender_name"].", ".$_email_nl.$_email_nl; $message .= "Your paid amount ".$amount." ".$rs["currency"]." has been added to desired account.".$_email_nl.$_email_nl; $message .= "Regards,"; $message .= "my company"; mail($to, $subject, $message, $headers); Link to comment https://forums.phpfreaks.com/topic/218467-help-in-sending-emails-php/ Share on other sites More sharing options...
Deoctor Posted November 12, 2010 Share Posted November 12, 2010 check whether in the server where u are using this have the port 25 opened. u can test that using this at command prompt telnet localhost 25 Link to comment https://forums.phpfreaks.com/topic/218467-help-in-sending-emails-php/#findComment-1133366 Share on other sites More sharing options...
yashbhav Posted November 12, 2010 Author Share Posted November 12, 2010 Hi ym_chaitu, thanks for your reply. Yes, it is open and I also checked with sending test email with normal code. But, this code not working for me. Should I try something like this with help of sessions? $email = $_SESSION["sender_email"]; $to = "$email"; ........ ....... Link to comment https://forums.phpfreaks.com/topic/218467-help-in-sending-emails-php/#findComment-1133367 Share on other sites More sharing options...
Deoctor Posted November 12, 2010 Share Posted November 12, 2010 try to echo the values what u are getting for the $to and so on and check it out.. Hi ym_chaitu, thanks for your reply. Yes, it is open and I also checked with sending test email with normal code. But, this code not working for me. Should I try something like this with help of sessions? $email = $_SESSION["sender_email"]; $to = "$email"; ........ ....... Link to comment https://forums.phpfreaks.com/topic/218467-help-in-sending-emails-php/#findComment-1133368 Share on other sites More sharing options...
yashbhav Posted November 12, 2010 Author Share Posted November 12, 2010 Hi Again, Thanks for your reply. how can do that? Can you guide me a bit? Thanks Link to comment https://forums.phpfreaks.com/topic/218467-help-in-sending-emails-php/#findComment-1133370 Share on other sites More sharing options...
Deoctor Posted November 12, 2010 Share Posted November 12, 2010 before sending echo the values echo "TO --> ".$to."\n"; like this and so on for the other values.. Link to comment https://forums.phpfreaks.com/topic/218467-help-in-sending-emails-php/#findComment-1133372 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.