how to add click link inside the email body

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
Lphp
Forum Commoner
Posts: 74
Joined: Sun Jun 26, 2011 9:56 pm

how to add click link inside the email body

Post by Lphp »

how to add click link inside the email body :x
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: how to add click link inside the email body

Post by social_experiment »

Send the email in HTML

Code: Select all

<?php
$message ='
<html>
<body>
<a href="www.site.com/page">Go</a>
</body>
</html>';

mail($to, $subject, $message, $headers);
?>
Edit: You could also just add the tag; if the email is sent in plain-text and doesn't go into the junk mail folder it should still be clickable.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Lphp
Forum Commoner
Posts: 74
Joined: Sun Jun 26, 2011 9:56 pm

Re: how to add click link inside the email body

Post by Lphp »

thank you for the suggestion, but the click link is under www.site.com/page not the Go ( on email)
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: how to add click link inside the email body

Post by social_experiment »

Lphp wrote:thank you for the suggestion, but the click link is under www.site.com/page not the Go ( on email)
I don't understand what you mean with this
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
phphelpme
Forum Contributor
Posts: 261
Joined: Sun Nov 21, 2010 3:32 pm

Re: how to add click link inside the email body

Post by phphelpme »

you need to post your little snippet of code so we can see what you are talking about as that reads you see the website link not go on the email and if you want to change that then just change your text for the link between <a></a>.

Post your code and we could help. :)
Post Reply