I have defined an HTML email template that has an anchor tag which its href attribute is assigned to a handlebars.js
Something like this:
<td class="body-text" align="left" class="padding">For the latest information on this order, please click here.<br></td>
I'm using Litmus to preview all the Email clients available but notice that in Outlook 365 it would show the content inside the email between brackets.
After some research, I came with this issue in their official repository. So, Outlook expects to add the full URL but I'm sending a handlebars.js variable instead. How could I solve this issue?
This may be related to this issue:
http://freshinbox.com/blog/outlook-com-removes-placeholder-links-in-email/
Outlook.com and Office 365 don't like dummy or empty links and subsequently you'll see broken templates in Litmus tests.
For testing purposes, it'll be best to follow the steps in the article I linked and test again.
Related
I'm sending an HTML mail from my app, this mail contains URLs, is there a way to prevents from mail clients to show these URLs as links?
for example:
<table>
<tbody>
<tr>
<td>http://www.google.com</td>
</tr>
</tbody>
</table>
will generate" http://www.google.com
instead I want it to generate a static text.
any thoughts?
This is a feature of some mail clients and there's no foolproof way to stop them from doing whatever they want with the message contents.
You could try to trick the mail clients by wrapping the addresses in empty tags and hope that they aren't smart enough to see through it:
<td><span>http</span><span>://</span>www.<span>google.</span>com</td>
Use a "zero width space" character:
It does as the name implies. It adds a space in your string but the space takes up zero width so instead of looking like two strings, it looks like one.
I have found the accepted answer doesn't work for Outlook 2013. I have had success with the following:
http<a href='#' style='text-decoration:none; color:#000;'>://www.google.</a>com
Setting the style cursor:default is not honored by Outlook 2013, but if you only make the middle of the url a hyperlink then a user can still select the link text without the cursor pointer appearing.
I'd say that largely depends on the mail client and thus is beyond your control. The only option would be to not make it a URL. E.g. write www.google.com (which the user can copy/paste just like the URL.
I didn't have any luck in preventing MacMail and Yahoo Mail from creating links out of any text string ending in .com (or other domain extension). After hours of testing (even 'href=""' and 'href="#"' did not work), I finally inserted my own URL and then manipulated the CSS and inline styles to remove the mail clients' link styling.
Adding in hidden line break elements in the right places seems to have fixed this for me (for now) in almost all clients, including desktop Outlook, according to Litmus's tests (Apple Mail desktop looks like the main exception).
https:<br style="display: none;"/>//www.w3<br style="display: none;"/>.org/TR/2020/WD-WCAG22-20200227/
Bit of a head scratcher here, and I'm still waiting on some details.
The client reported that in Outlook, they are seeing the link in square brackets after the A tag. This apparently just started with the most recent round of e-mails I did for them, but the link code has not changed.
Here is an example of a link :
<p style='margin-bottom:20px !important;' >
Visit MyBlue to log on or register today.
</p>
Here is an image of what they are seeing :
http://rweststaging.com/webmd_emails/example/example.png
I've tested in Litmus, and sent out test e-mails through MailChimp, and I'm not seeing that on any of the outlook versions.
I thought it might be some setting on their particular Outlook install, but they reported only seeing that happen on this particular group of e-mails.
try to add https:// to link in <a> html tag
I had the same problem but in my case part of the url was written with "\", I changed that to "/" and problem was solved-
I (and some folks) need to send a lot of similar e-mail's everyday. Using Outlook 2010 as mail client. Today I want to somehow simplify this process.
Thinking about html page with mailto links. Like:
Letter to someone
Letter to someone else
etc...
Problem is come out when I clicked on one of them. Outlooks "New message" window pops up, but without signature. It's only text from mailto link in body.
Can someone point out what I did wrong?
I'm trying to figure this out as well.
According to http://www.experts-exchange.com/Software/Office_Productivity/Groupware/Outlook/Q_26410679.html you get either the body or the signature. I've tested this and removing my body text brought my signature back.
Alternatively, you can hardcode your signature into the body text.
Microsoft is not going to fix this bug. The workaround is to add it in the email body.
I believe the following MSDN article explains what you're describing: Messages that are created outside Outlook do not include the default Outlook email signature (KB 2544665)
Pretty sure you cannot customise a signature from the mailto: link.
The 2 ways to look at it is either setup your signatures in Outlook itself or, add the "signautre" to the bottom of the body included in the link?
I recently learned that webmail clients like Gmail will do alterations on HTML emails, for example adding target="_blank" to <a> tags.
I've also discovered that other alterations happen as well. When I send an HTML email to Gmail (and possibly other web mail clients) from my PHP script, variable values included in the URL of any links are being stripped out. So, for example, this is the value I'm setting in my PHP code:
$mailContent = '<p><a target="_blank" href="https://example.com/confirmation.html?verification=x1x1x1x1x1x1x1x&email=yyyy#email.com">click here to go to the web site and activate your account!</a></p>';
But when the email is received in Gmail, the HTML code comes out like this:
<p><a target="_blank" href="https://example.com/confirmation.html?verification=&email=">click here to go to the web site and activate your account!</a></p>
The values x1x1x1x1x1x1x1x and yyyy#email.com have been stripped out from within the <a> tag.
How do I protect the values of the variables that I want to pass to the URL so that Gmail won't remove them?
Click View original/source on the message in Gmail to see if the URLs looks like they should then. If so you know that the problem is how Gmail is formatting the message for your viewing. If it's mutilated even in the source I was wondering if there's anything in your webpage/php/CMS (do you use one) that changes the code.
You should try URL-encoding as #Crisp said. Here's the W3 reference.
Emailing in html uses Quoted-printable Encoding. The problem with your $mailContent is that the "=" must be represented by =3D
Try adding this:
$mailContent = quoted_printable_encode($mailContent);
This may not be the perfect answer, but if your application allows for it, I have used URL shorteners a number of times.
http://goo.gl/ is my preferred because the API is super easy to implement and google is very fast. I have a function in a class and I just run my url through it and send the return wherever I need it to be.
Another non-perfect answer here but, my problem was that I was including an http url in the html body and apparently is not valid so I changed them to https. This was on a dev environment so no problem on production.
Here is more info about this:
Any URL's in the body of the mail which lead to insecure sites may also need to be removed. Use https://transparencyreport.google.com/safe-browsing/search to validate these links.. All links should be correctly prefixed with "https". https://en.wikipedia.org/wiki/HTTPS Google seem to be rejecting "http". Sometimes, but not always, removing links from any signature can help.
I'm trying to use an html email signature that pulls the html from another site. So, imagine I have the html hosted at blahblah.com/blah.html, and blah.html is:
<html>
<body>
Jon Jones
jon#blahblah.com
</body>
</html
And then my html signature would be something like <embed src="blahblah.com/blah.html/> that way I can manipulate the signature without having to constantly change the actual signature in Outlook (which I use to check my email).
I can't figure out any html that will do what I'm trying to do. The embed tag that I posted above doesn't do the trick. What simple line of html can I use to say "display what you find at blahblah.com/blah.html"
I would venture a guess and say this isn't the best way to do this.
From a security standpoint, I wouldn't want to be viewing any email sent by you that also brings in somesite.com/signature.htm. Even if it did, it would invoke a "click to view linked elements in this email" banner, and hide it until I did so (but chances are I'm not clicking).
From a recipient stand point, some spam filters block emails with externally-linked content (your intended recipient may not even get your email, or (best-case) see it with [spam] in the subject line.)
If you want an easy up-keep, you could place the signature in your my documents/some other folder and link to it via outlook's settings, but that about the least intense method (while also not causing concerns or issues to anyone viewing your email.)
It looks like instructions for what you want are here: http://www.emailaddressmanager.com/tips/html-email.html
Under "How to add HTML links in Outlook HTML emails," point to blahblah.com/blah.html
On the other hand, HTML in emails is generally not a great thing because it often isn't very secure (you could send me a page with HTML that would load a virus), so many clients won't be able to recieve it or will flag it as spam.