Bennyh789 Posted May 19, 2013 Share Posted May 19, 2013 Hello all, I am using v2 and I am looking to send an email to the user when they receive a mail. I have put the code with: mail( $ir['email'], Testing email Thanks, Bennyh ", "From: [email protected]"); print "Message sent.<br /> <a href='mailbox.php'>> Back</a>"; } The code above obviously sends the email to the sender and works well however how will I enter the code so the email goes to the reciever? I have tried all sorts of different combinations with no success a few below: mail( $r['email'], mail( $to['email'], mail( userid = $to['email'], Thanks in advance Ben Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 19, 2013 Share Posted May 19, 2013 (edited) here is something i use: $subject = "Your Email Confirmation"; $headers = "From: [email protected]" .$_SERVER['SERVER_NAME']. "\r\n"; $headers .= "X-Mailer: PHP/" . phpversion() . "\r\n"; $headers .= "MIME-Version: 1.0 \r\n"; $headers .= "Content-Type: text/html; charset=UTF-8 \r\n"; $body = "<html><body>"; $body .= "Your email body can go here"; $body .= "</body></html>"; mail(filter_var($emailTo,FILTER_SANITIZE_EMAIL), $subject, $body, $headers); Hope this helps Edited August 31, 2014 by KyleMassacre Quote Link to comment Share on other sites More sharing options...
rockwood Posted May 31, 2013 Share Posted May 31, 2013 phpmailbox use this package for out side mail 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.