Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Adding an active URL Link within Text Editor

Posted on 2014-03-11
11
Medium Priority
?
575 Views
Last Modified: 2014-03-13
Hello,

A developer has created a PHP site which sends an automatically generated email to a nominated user. This email contains a link. I notice that in Gmail this link is active and clickable - however in Yahoo mail, this link is inactive and is just text (confirmed by other users).

Below is the code used:

{P}To login and complete your assessment, please click on this link {A}http://www.mysite.com/here{AEND} and then enter your password {TOKENID}.{PEND}

Open in new window


Is there a way to edit this code to ensure the url shown is 'active' (clickable) when it hits all email providers?

Thanks
0
Comment
Question by:dabug80
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
11 Comments
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 39922710
Try to see if regular HTML code works:
<p>To login and complete your assessment, please click on this link <a href="http://www.mysite.com/here">http://www.mysite.com/here</a> and then enter your password {TOKENID}.</p>

Open in new window


If not, we're going to need the code, cause something should replace {A} and {AEND} with html code and apparently it's not doing so.

HTH,
Dan
0
 
LVL 1

Author Comment

by:dabug80
ID: 39923141
Thanks for the suggestion, but it didn't work. I found this discussion on links not working in Yahoo mail. Perhaps it's a Yahoo thing.
0
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 39923158
Gmail and most email clients will take anything that resembles an URL and transform it into a clickable link.
Yahoo decided not to.

Try to see the source of the message as it was received (in gmail, yahoo, does not matter) and see if the URL has standard <a> tags surrounding it.
0
Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

 
LVL 1

Author Comment

by:dabug80
ID: 39923165
I've viewed the Yahoo page source and it's showing:

<\/p>\\n\\nTo login and complete your assessment, please click on this link http:\/\/www.mysite.com\/here and then enter your password

Open in new window


So it doesn't look like Yahoo likes to code links
0
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 39923173
It's not Yahoo's job to code links, it's yours. Just because gmail helps you when you forget, does not mean Yahoo is forced to do the same.

You need to send standard html code, so review the generator (that at the moment only escapes "/", not adding the <a></a> tags).
0
 
LVL 1

Author Comment

by:dabug80
ID: 39923190
I tried emailing with just the content:

<a>mysite.com</a>

And the link still didn't activate.
0
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 39923194
Of course. That's not valid code. Try this:
<a href="mysite.com">mysite.com</a>
0
 
LVL 1

Author Comment

by:dabug80
ID: 39923232
Ok. I tried

<a href="http://www.mysite.com">mysite.com</a>
and
<a href="mysite.com">mysite.com</a>

Neither worked (that was the only content I had in the email). It just returned text in Yahoo.
0
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 39923357
How did you send the email? From an email client? If so, you have to use the "Insert hyperlink" feature.
Here's what Thunderbird sent when I just pasted <a href="http://www.mysite.com">mysite.com</a> in the message body:
 &lt;a href=3D<a class=3D"moz-txt-link-rfc2396E" href=3D"http://www.my=
site.com">"http://www.mysite.com"</a>&gt;mysite.com&lt;/a&gt;

Open in new window


And here's the result when using "Insert hyperlink":
<a href=3D"http://www.mysite.com">mysite.com</a>

Open in new window

0
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 2000 total points
ID: 39923508
There are several layers of things going on here.  Let me tell you what I have experienced with things like this.

1. There is no accountability in email.  Every part of the headers and the message can be bogus.  You have no control over what the client email reader does with your message.   You cannot control the rendering of your message, nor know whether it has been read with more than a very little certainty.

2. There are many, many email reader programs.  They work differently.  They render identical data differently.  Some of them will render anything that looks like a link in the form of a link.

3. Some people perceive that hyperlinks in email represent a security exposure.  It might make sense that Yahoo would look down upon links because anybody still using Yahoo email probably started many years ago and may be an older and unsophisticated user, the gullible kind that would click the "get rich quick" link and get taken to an attack site.  (Don't laugh - I have clients who believe everything on the internet)

4. There are basically two types of email messages - plain text and HTML.  If you want to send plain text it's pretty easy - you just send a text string in the body of the message.  If you want to send HTML (which may give you a better chance of getting your links to be clickable) you can follow the guidelines here (Example #4):
http://php.net/manual/en/function.mail.php

5. If you want to simplify your life, consider using a service like ConstantContact.
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 39927851
Thanks for the points.  Looking over some of the broadcast email I receive I'm finding a frequent and sensible design that says, "Click here or copy / paste into your browser."  Seems like a good idea.
0

Featured Post

Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question