Solved

Adding an active URL Link within Text Editor

Posted on 2014-03-11
11
551 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 34

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 34

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
 
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 34

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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 34

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 34

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 108

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 108

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to count occurrences of each item in an array.

762 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now