Page 1 of 1
Hyperlinks
Posted: Wed Dec 26, 2007 12:31 am
by gph1
I am trying to add a couple of hyperlinks to outgoing emails. I'm sending HTML format and just typing in the URL in the text msg.
The only client displaying the link is Outlook 2007. All other versions of Outlook and all other mail clients are just seeing text. How do I fix this?
Posted: Wed Dec 26, 2007 5:46 am
by s.dot
If you're sending in HTML format, and just typing the URLs as text, it is up to the mail client to render them. Some do it automatically, some do not. You should be wrapping your links in <a href="link">link</a> tags to ensure that the client will display them as a link.
Posted: Wed Dec 26, 2007 10:35 am
by gph1
Sorry, yes I've tried that and yes I've used escape characters for the quotes. Thunderbird will not display as links when I do that.
Posted: Wed Dec 26, 2007 10:37 am
by John Cartwright
Example?
Posted: Wed Dec 26, 2007 11:12 am
by gph1
Code: Select all
//Create the message
$message =& new Swift_Message("A Puzzle", "Greetings.<br/><br/>Someone you know requested that I send this puzzle to you. <br/> The puzzle is free for everyone to enjoy and or share with family and friends. <br/>I am a freelance illustrator having worked for over 30 years creating art for children.<br/>Have fun.<br/><br/>Joe Smith<br/><br/> <a href=\"www.something.com\">something.com</a> <br/> <a href=\"www.something.com/main-pages/Puzzle-page.html\">Puzzle Page</a> <br/><br/> P.S. If your friend included a note to you it will follow here: <br/> $commentstofriend");
$message->setContentType("text/html");
Posted: Wed Dec 26, 2007 4:28 pm
by Chris Corbyn
Your hyperlinks are not valid absolute URLs. Thunderbird is probably treating them as a security risk. Prefix the http:// part onto them.
Posted: Wed Dec 26, 2007 5:54 pm
by gph1
Thank you for your help, that worked.