How can I make the images in the email template to show in every client? - email

The images embedded in the body of a Visualforce email template don't show in all the clients.
I am not sure where to start. I've tried to set the tag to <apex:image/> and <img />.
Tried to use URLFOR($Resource.Static) in the value attribute.
Tried to copy/paste the image server link.
I expect that the images in the body show in every client.
So far all the images are replaced by the alt attributes or just a blue border.

alt's might be there because client is not trusting SF and you need to explicitly allow downloading images, asking your recipients to add you to safe senders list etc.
But that's not all. Static resources are served from generic domain. There's nothing really tying them to given org (even if it has MyDomain enabled). They rely on your cookies for redirect to right org's resources and don't work well in email templates or VF pages set to renderAs="pdf".
You should use old-school Documents (if you're in Lightning UI - flip back to Classic), upload your stuff there, make sure "externally available image" checkbox is ticked...
Or in Files I think you can set deliveries, build the direct download URL too that should work OK (look for something with "shepherd" in URL, I know it sounds stupid)

Related

Google DFP ads Image not loading

The issue I am running into is rather simple, the creative URL's are not clicking through within certain email clients (most often Gmail). More specifically, in GMail the creative can sometimes click to a blank page where the redirect URL will just sit idly and for some users, it will redirect to the appropriate URL.
I identified that the creative will not click through if the 'img src' and 'href' URL's are not identical (think /ad & /jump & /adx), furthermore I've identified that Google also prepends their content server location to some URI's (Google Content Server URI's look something like this "https://ci3.googleusercontent.com/proxy/....#") thus this makes the img src completely different...yay! We've looked at adding and removing co=1 / 0 --> this hasn't done anything for us.
We also tried hosting the Ads on our server and clicking the email to go to our domain. But on our domain DFP Ad images are not loading and add the style attribute (style="display:none;") on the image and due to that link also not working and we came across the same issue that if the 'img src' and 'href' URL's are not identical Ads will not work.
Can someone help me here and let me know why display:none is being added on the Ads?

Is there a way to embed an iframe in an email with text that updates?

I want to embed an iframe inside an email that contains the 10 most recent chat messages. Is there a way to make this iframe dynamic so that it always shows the latest 10 chats regardless of when the email is opened? If the iframe is not the correct way to do this, is there a better way?
You can implement an iframe into the email - but your mail will be recognized as spam by many providers.
You should try to render your content dynamically into an image and implement that image into the email.
There kind of is a solution. It is using Dynamic CSS with a fallback of a Dynamic image to pull the information. It is not elegant really as for some clients (e.g. Outlook) this is not available at all and will only display initial information. It also utilizes a link for a style sheet which also severely limits which clients this will work in.
The fall back dynamic image is a bit more comprehensive in client support, but much harder to maintain as you will need to build something that programatically pulls the tweets (HTML webpage potentially) and then also have something that creates and hosts an image for the email to pull. This is not a short, simple thing to set up and may not be worth the required back end work for a simple email.
See this link for a bit more in-depth info on how this can be done for adding a live twitter feed into an email: https://litmus.com/blog/how-to-code-a-live-dynamic-twitter-feed-in-html-email
Since there was no accepted answer i thought i would give my input as well.
Litmus had done something similar for their live twitter feed in emails sometime ago.
The method i can think off is to create a PHP page which takes 10 images and makes it into 1. PHP can have a loop that checks for increments from a specific number and if it exists then add to that 1 image. When there is a new chat image added, PHP will disregard the last one and add the new in the loop.
For anyone reading this in 2022, this is possible with AMP.
Instead of an iframe, you can create a dynamic email easily.
check out amp.dev
Note: AMP is not supported by many email clients

Are deceptive redirect hyperlinks safe to use in emails?

We're generating some emails programmatically. We need to include a hyperlink that takes people to a page on website A, but we want to use website B to track their click before redirecting.
Is it safe to show the URL to website A, but in a hyperlink that really takes them to website B? That is, something like this:
Here's the page you wanted:
<a href="http://website-b.com/someTrackingToken">
website-a.com/theThingYouWereExpecting
</a>
... or does this look sufficiently scam-like that some email clients might object to it?
Note:
We specifically do want the website-a.com URL to be visible to the email recipient.
The sites are on different domains.
You can set the visible link and the href property to be two totally different things and there's usually little to no consequences, this is pretty standard for most mailers that need tracking.
The thing is, why not just wrap some text instead of a literal link? Present it as a button if you're worried about "click ability".
If you want to present a link that's nearly the same, why not just append some parameters on the end that trigger the tracking action? Like /x vs /x?token=XXX where you can grab that and and process it at any point of handling the request. Just suppress the display of that in the raw URL you're showing.

Why are email senders placing tracking images at the end of the content?

All the email providers are placing zero pixel images at the end of the content for tracking opens. Is there any particular reason? For example:
<img src = "http://tracksamle.com/ssss/track.gif" width="0" height="0">
Someone may be able to explain to larger detail, but I'm guessing it is forcing the email client to fetch the image from said address (which I would guess is unique such that it can be cross linked to the intended receiver of the email).
By then, on server, you can determine if the email has indeed been opened, and the IP-address of the opening party.
How this interferes with spam filters and other in-transit email scanners, I do not know though.
Edit:
As #bartdude also mentions in comments, positioning at end imposes least inconvenience on load times for the reader, as by then rest of the email should already be loaded, albeit this depends on implementation of loading process.
Adding to the answer above, note that if someone opens an email and has the option to "load images" and they don't click the link to load them, it will not count as an open. This is true also for text only emails. So if someone is tracking opens, they will never be accurate because of this.

Email tracking tools, How it works?

Did you work with email tracking tools like "GetNotify.com"?
I want to know how it works, with details.
In my opinion we have to create a php code that contains img tag, but I don't know how can I attach this on email content.
Thanks.
According to this FAQ entry, they insert an invisible image into the e-mail.
The idea behind this technique is that, upon e-mail opening, that image is downloaded from their server, providing them the IP address and the timestamp. Although, relying on the image being fetched, this service fails as soon as the image is not fetched (which you can configure many e-mail clients to do). EDIT: There is also a FAQ entry on that topic.
Inserting such an image into an e-mail is fairly simple: You need to get the e-mail html content and insert a new node. This is the second drawback: It fails when you use text messages. Instead, you would have to create a new HTML message.