Jump to content

Trouble Sending HTML Email with PHP


Shadow Jolteon

Recommended Posts

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! =)

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.