php mailer no pictures in gmail - gmail

in phpmailer I didn't see pictures in gmail, only if I press show images, same email sent from outlook (same text, same from, same smtp, same dkim, same x-mailer) it's OK.
Any ideas? I want phpmailer because i can rotate things in subject or from or bla bla.

Outlook inlines image data to avoid client connections to outer sources. Instead of using external links with html bodies, use attached images or inlined HTML binary data with appropriate mimes during creation of e-mail body.
Here is an example code:
<img src="data:image/jpeg;base64{binary_data_here}" />

Related

Gmail won't display images from external sources or inline base64 from my HTML emails

I'm automating some HTML email notification to my users in my node server, sending emails using Nodemailer and one of my 'no-reply' g suite emails.
In my node server, I build my HTML emails dynamically, based on content and notification type, and in all of them I want to include social media icons, my company logo (served from my server public assets folder) and in some of them an inline base64 qrcode for user interaction.
In Outlook all images are perfectly visible, even the base64 one, but when I try to view it in gmail, it just won't display. This has something to do with the proxy that gmail uses by default, but I couldn't figure why this is happening with my emails.
I receive tons of html emails with images in gmail, and all them work pretty fine.
I've done a lot of research already, and followed all tips related to gmail 'Images' configs, but nothing works.
What can I do to make my images visible in gmail??
Thanks!
Base64 images are not supported by Gmail, Yahoo and problematic in other email clients.
The best way to make your images visible is to host your images remotely and link to them.
As an example:
<img src="https://via.placeholder.com/200x50" width="200" height="50" alt="alt_text" border="0" />
As opposed to:
<img alt="Embedded Image" src="data:image/png;base64,ieMailBoreGoWALLYNSUyEAAAEIEIO..." />
Good luck.

phpmailer sent inline images as attachment

when I try to send emails with phpmailer, it send inline images as attachment. I mean before opening email for example in yahoo or gmail , they show that this email has attachment and when I open the mail, it shows images inline and in their right position with no problem,
but I see many emails with inline images that show emails as one that don't have any attachment.
by the way for embedding images to phpmailer I use this method: addEmbeddedImage(filename,cid)
what can I do to solve this problem?
thanks for you help
If you attach images to an email, they are attachments, no matter what. If you use them by referring to their cid values from within your HTML, they will render inline as well, but they will still be shown as attachments, because they are. If you refer to images using remote URLs, they will render inline as well (providing you allow your mail client to do so), and they will not show as attachments - that is what the other messages you're seeing will be doing. Generally speaking, referring to images remotely is preferable to embedding/attaching.

PHPMailer doesn't load HTML email with attachment on iPhone

I'm using PHPMailer to send an HTML email when someone requests a brochure from a website.
My issue is that when I send the email without the attachment the email opens and displays the HTML email correctly. As soon as I add the attachment it doesn't load the HTML email and just shows text. NB: I haven't uploaded any code as the email itself sends with or without the attachment, so didn't think you guys would need it.
So:
1) Email sends OK with or without the attachment
2) With the attachment, it arrives (with the attachment) but doesn't show HTML email
3) Without the attachment the HTML is displayed correctly.
This specifically relates to an iPhone and it asks me to download the remainder of the email.
I know this should work OK as I know a competitors website that uses the exact same process and their email loads perfect everytime!
Any help would be useful.

Data URI image embedded in html page to be view in email client

I have a html file (generated via knitr package in R). It has a image which is encoded as data uri so there is no need for image attachments. Here is the link to that sample.html
http://jsfiddle.net/ebwsozav/
Sending it as an attachment, hasnt been issue but now we want to send this html to be embedded into the content of the email.
Using mutt, mutt -e "set content_type=text/html" -- person#gmail.com < sample.html.
Upon opening the email, I realised that the image couldnt be seen, though the html tables and other content could be.
Screenshot attached here
I read that gmail blocks images.
Could this the reason and is there a way to circumvent this problem ?
Update
Outlook cant view it.
Gmail in Android not able to view.
But surprise,surprise
Gmail in iOS system is able to view the image.
I read that gmail blocks images.
Partially correct. Gmail filters data URIs from being displayed in its interfaces, but it allows you to download/forward the original message (including the data URI) to a mail client that doesn't filter it. It does block (all) images on messages flagged as spam.
is there a way to circumvent this problem ?
Not exactly. You have to either use a regular URL or attach the image. It is intended for there to be no way to use data URIs in their interface.

Lotus Notes handling mailto links from HTML formated emails

I am sending emails to different users in my corporation. Some of our clients use Lotus Notes (8).
These emails are generated by the server. Inside this email (HTML formatted), there is a link to a "mailto":
Please <a href="mailto:myaddress#mycorp.ca" >click here</a> to reply.
There is nothing else in the body of the email.
Unfortunatly, when I click on this link (wich does appear as a link when reading the email from a Lotus Notes client), I get this error:
\\mailto:myaddress#mycorp.ca is not accessible. You might not have permission to use this
network ressource. Contact the administrator of this server to find out if you have access
permissions.
The parameter is incorrect.
On the other hand, if I create the email manually through the Notes client (using a "HotSpot"), the link works... Unfortunatly, generating the email with the Lotus Notes API is not a possibility because (a) we do not have a Domino server in our corporation, and (b) not all of our users use Lotus Notes...
Question: Is there a way to fix this problem without using the Lotus Notes API?
I have tried this :
<div onclick="window.navigate('mailto:myaddress#mycorp.ca');" >Click Here</div>
but the javascript code is ignored... (probably a javascript security restriction in the client).
I have also considered not using HTML format in my emails; I could do most of my formatting using Rich Text Format, but I do not know what syntaxt would generate a Hotspot (or a functional mailto link) in the RTF content...
I am not sure that there is a way for one link that will work for both clients - Outlook and Lotus.
Lotus Notes developers call it HotSpot.
Check those links, if you can create it manually - send it to yourself and check the sent HTML.
http://blog.iangoodsell.com/2009/06/i-hate-lotus-notes-inserting-hyperlinks.html
http://www.alanlepofsky.net/alepofsky/alanblog.nsf/dx/creating-links-to-a-web-page

Resources