Click to See Complete Forum and Search --> : email question
damon2003
11-04-2003, 05:42 PM
Hi,
I want to send an email from a web page which is fine, but I also want to put a link in the email and attach a variable to it that will be displayed when the user click and goes to the new page, whats the best way to do this?
thanks
Basically, just make sure you set the Content-type text/html. Something like this headers:
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";Then, just write out your link as you normally would and hope they can receive HTML formated email... :)
Code One
11-07-2003, 12:05 AM
How do I send fromatted email? Do I have to put an asp, or php script in the messafe form itslef, or do I link them some how? Im totally confused.
CO
The above lines allow you to format the email message with HTML. Something like this:
<?PHP
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: you@your.com\r\n";
$to = "ryan@infinitypages.com";
$subject = "Some subject";
$message = "<p>This is the message with some <em>HTML</em> formatting.</p><p>Second paragraph...</p>";
mail($to, $subject, $message, $headers);
?>
Code One
11-07-2003, 04:32 PM
For the info.
CO