parsing tags in email();

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
glennn3
Forum Commoner
Posts: 63
Joined: Sat Sep 20, 2003 8:43 pm

parsing tags in email();

Post by glennn3 »

what do i need to do to get this URL parsed in my mail function...?

Code: Select all

$message="A gift subscription of The Ensign Literary Review has been purchased for you by $givername. To enjoy our fine literature visit our website at      
<a href="http://www.theensignliteraryreview.com">The Ensign Literary Review</a>.";
please and thanks,
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

what do you mean by parsed?
glennn3
Forum Commoner
Posts: 63
Joined: Sat Sep 20, 2003 8:43 pm

Post by glennn3 »

forgive me - it's returning " <a href=\"http://www.theensignliteraryreview.com\">The Ensign Literary Review</a> " in the emails, even though i receive in html - i'd like it to just return " The Ensign Literary Review " as a link...

thanks
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

that's not parsing. that's something you need to set in the header., you need to tell it to send it as html. jsut so happens i have an email i send as html, thius i can help you here.
i'll be right back witht he correct code for the header, int he meantime, reformat the body so it's entirely html
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

this is from my script, and the headers are not the only relevant part, since you will be using html, you have to adjust the body, hence why i'm showing more thant he headers.

Code: Select all

$sub='FYD: verifying your new e-mail address';
        $headers="MIME-Version: 1.0\nContent-type: text/html\nFrom: $fydstaff";
        $message="<html><body><p>Hello again $un. 
<br />This is to have you validate your new e-mail address. You will not be able to sign in again until you do.
<br />Your password is $pw.
<br />To confirm this address, please point your browser to <a href="http://www.FindYourDesire.com/email.php?un=$un&cod
e=$conf" target="_top">http://www.FindYourDesire.com/email.php?un=$un&code=$conf</a>. If your email client does not s
upport html (in which case we'd like to apologize for the appearence), the copy http://www.FindYourDesire.com/email.php?un=$
un&code=$conf into your browser's location bar and go to that page. Once it say's you have been validated you may sign back 
in. Until then you will recieve error messages when trying to access restricted areas on the site.
</p><p>-FindYourDesire Administration</p></body></html>";
        mail($email, $sub, $message, $headers);
Post Reply