Shadow Jolteon Posted August 10, 2009 Share Posted August 10, 2009 Hello. =) I have been working on a registration system for my website, and everything is going great, except for the verification email... I have never worked with the mail() function before, and have no idea what I am doing wrong. Whenever I submit the form, it sends the email, but for some reason, the HTML is sent as an attachment to the email, which is blank. $emailHeaders = 'MIME-Version: 1.0'."\r\n"; $emailHeaders .= 'Content-type: text/html; charset=iso-8859-1'."\r\n"; $emailHeaders .= 'To: '.$registeredName.' <'.$registeredAddress.'>'."\r\n"; $emailHeaders .= 'From: Site Name <registration@somesite.com>'."\r\n"; mail($registeredAddress, 'Account Verification', $emailContent, $emailHeaders); Any help with this would be greatly appreciated. Thanks! =) Quote Link to comment Share on other sites More sharing options...
alexdemers Posted August 10, 2009 Share Posted August 10, 2009 Follow the examples here: PHP: mail - Manual. There's an example with HTML emails. Also, make sure your email client does in fact support HTML emails. If it does, is it turned on for that particular address? Maybe there's a security option in your email client that restricts parsed HTML emails if you don't know the sender. Quote Link to comment Share on other sites More sharing options...
Shadow Jolteon Posted August 10, 2009 Author Share Posted August 10, 2009 Yeah, I've read through the PHP mail function manual a bunch of times already... =/ And, yes, my email client definitely supports HTML email, and it is turned on. =) I've never had any trouble receiving HTML email in the past, even from unknown senders. Also, I've tested this on two separate clients, just to make sure, and I get the same results... 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.