Solved

Adding an active URL Link within Text Editor

Posted on 2014-03-11
11
561 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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 110

Accepted Solution

by:
Ray Paseur earned 500 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 110

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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

680 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