Jump to content

Add link into email message


petenaylor

Recommended Posts

Hi all

 

I have a script that creates an email message, but I want to add a link to it to take the user to PayPal. Here's my code:

 

$headers  = "MIME-Version: 1.0\n";

$headers .= "Content-type: text/html; charset=utf-8\n";

$headers .= "From: '".$_SERVER['HTTP_HOST']." Booking System' <info@".$_SERVER['HTTP_HOST']."> \n";

$subject = "Booking Confirmed!";

$message = "Dear ".$name.",<br /> <br /> This is confirmation of your booking. <br />";

$message .= "<table cellspacing=0 cellpadding=4 border=0>";

$message .= "<tr><td>Date</td><td>Time From</td><td>Time To</td></tr>";

$message .= $tempVar;

$message .= "</table>";

$message .="<br />Reservation Status: Confirmed<br/>";

$message .="<br /><br />Kind Regards, <br /> ".$_SERVER['HTTP_HOST']." Team";

mail($email,$subject,$message,$headers);

 

Can anyone help me add a line to the above to add the link in?

 

Many thanks

Pete

Link to comment
Share on other sites

Not all email clients support HTML emails. Most modern ones do, though.

 

I'm not 100% sure but I think a special property has to be set to flag the email as containing HTML otherwise it won't be parsed. I'm not sure how to do it off the top of my head, though

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.