spires Posted September 19, 2006 Share Posted September 19, 2006 Hi to one and all.I'm trying to make so when i send an email, it will have a from address. I can do this, but, when i use the $header the 'from' dont work. Can someone please tell me where i'm going wrong. ;DThanks[code]$link = '<a href="http://www.theeventorganiser.com/login.php">login</a>'; $to = 'spires1@mail.com'; $from = 'spires1@mail.com'; $subject = 'Hi Ric, '.$first_name.' wants you to create their profile'; $message = 'Hi Ric,<br> '.$first_name.' wants you to create their profile<br><br> Here is there username and password<br> USERNAME = '.$usname.'<br> PASSWORD = '.$pword.'<br><br> Please login here<br>'.$link.''; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; mail($to, $subject, $message, "FROM: ".$from."", $headers,);[/code] Quote Link to comment Share on other sites More sharing options...
spires Posted September 19, 2006 Author Share Posted September 19, 2006 Hi, I've now got this code.This works, but i can get the from and the MIME to work together. Does anyone know how to join the two together?Thanks for looking [code] $link = '<a href="http://www.theeventorganiser.com/login.php">login</a>'; $to = 'spires1@mail.com'; $from = 'spires1@mail.com'; $subject = 'Hi Ric, '.$first_name.' wants you to create their profile'; $message = 'Hi Ric,<br> '.$first_name.' wants you to create their profile<br><br> Here is there username and password<br> USERNAME = '.$usname.'<br> PASSWORD = '.$pword.'<br><br> Please login here<br>'.$link.''; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $header2 = "FROM: ".$from.""; mail($to, $subject, $message, $header2, $headers);[/code] 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.