Jump to content

Sending HTML in mail()?


Recommended Posts

How would I go about sending HTML through the mail() function?


I'm currently using <br/> tags <a> tags and when I run the script and have the email sent to me, all the tags are visible.


	/*Generate activation email*/
	$subject='Activate Your Kynxin Membership';
	$headers='From: support@kynxin.com';
	$message='Thank you for registering for Kynxin.<br/>
	Please visit the following link to activate your account.
	<a href="http://www.kynxin.com/signup/activate.knxn?activate='.$activation_number.'">
	Thank You,<br/>
	The Kynxin Support Team
	/*Send registration activation email*/
	mail($to, $subject, $message, $headers);

Link to comment
Share on other sites

You really should consider using something like PHPMailer. It will make your life easier where this is concerned.


That just seems like it adds so much overhead to something that should be so simple. You have to add another file in, additional processing, etc. I just don't see what advantage that has over the regular mail() function.

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.

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.