Jump to content

Problem using mail function


frenly

Recommended Posts

I have a PHP script where I need to use the session variable $_SESSION['username'] to send email to the address contained in the session variable username. The session variable holds valid email address but when i assign the session variable to another variable and try to send email like-

 

$payer_email=$_SESSION['username'];

 

mail($payer_email, "Your order", $pins); , it does not work

 

But when i test the mail function using my email address directly as- mail ("[email protected]", "Your order", $pins), it works

 

Can somebody point me out what my mistake is in this case?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/95022-problem-using-mail-function/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.