html-email

Best Practices - Sending javamail mime multipart emails - and gmail

核能气质少年 提交于 2019-12-17 09:45:14
问题 I have a Tomcat application that needs to send confirmation emails etc. I have coded the emailer with Javamail (mail.jar) to send multipart text/html emails. I based the code on the Java EE examples. I'm using the SMTP MTA on the local server. It works great. In Outlook, I see the HTML version. If I drag it into the Outlook spam folder, I see the text version. So I interpret that as saying it works. However, if I view the emails in Gmail, I see only the text version. I know the HTML is there

Send a base64 image in HTML email

冷暖自知 提交于 2019-12-17 02:10:56
问题 Using a rich-text editor, our users can drag and drop a saved image from their desktop to the editor. The image appears and displays properly in the web page after they submit. Since the image is not uploaded anywhere, the editor saves the image as a base64-encoded image. <img alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA4QAAAFKCAIAAADKUQaBAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAP+lSURBVHhepP1p32zb etc. But it doesn't show up - not on the iPhone, nor

HTML Email sent via PHP treated as spam in Gmail

泪湿孤枕 提交于 2019-12-14 03:53:19
问题 I have the following php script which loads a html template from a .txt file on my server and uses str_replace to populate the template with the Email content before sending the email. At first I tried hardcoding my Webmail address on my server into the 'to' field of my mailer_send function which worked fine. The Email template displayed perfectly. However, when I then tried sending it to a Gmail account, it was marked as junk and the HTML was just displayed as plain text. Does anyone know

Is safe to put html style tag into body tags coding html emails?

孤者浪人 提交于 2019-12-14 03:50:30
问题 I am coding a html email template. All my code is inline. There are media queries between <style> tag inside the <head> tag. Can I put the <style> tag inside the <body> tag? Would that work with all major email clients? 回答1: It seems client dependent. Check out a similar answer here. Some clients will support the use of styling in the body, but generally not in the head. Since there is really no way to incorporate css, it makes sense that this would be the case. 回答2: Style tag inside the body

Email and Web split on different servers: Send email via PHP to an email on that domain

狂风中的少年 提交于 2019-12-14 02:30:05
问题 1 Domain that has port80 and MX split on the DNS: Website is hosted on a VPS. Email is hosted on a shared host. When I call the mail() function in PHP on the website that is addressed to an email on the domain , the email is delivered LOCALLY to the VPS and not to the shared server. In PHP running on the web host VPS using the domain MyDomain.com: $headers = "From: MyName <name1@MyDomain.com>\r\n"; $headers .="Return-Path:<name1@MyDomain.com>\r\n"; mail( "name2@MyDomain.com", "Header",

Force Inbox by Gmail to render desktop version?

我的未来我决定 提交于 2019-12-13 19:06:54
问题 I am working on a email/html template for a customer which we would like to render as good as possible and on as many clients as possible. My initial problem was that Gmail App was rendering the mobile version and I spent some hours to try to fix the many issues but in the end I placed a hidden td with a minimum width of 610px to force Gmail App to render the desktop version. I know that was a quick fix but I found it too time consuming to try to fix the many issues I had when Gmail App

Using .eml for HTML Mail Signature

笑着哭i 提交于 2019-12-13 18:40:01
问题 Ideally for HTML Mail signature in Outlook Mail (windows) we use .htm file and place that file in folder Users\UserName\AppData\Roaming\Microsoft\Signatures Lets Suppose: HTML Markup: <img src="someImage"> For embedding image as an attachment, I will have to use cid so the HTML Markup changes to: <img src="cid:0123456789"> Since this image is referencing to some cid in multipart/related. So the referenced part would be something like this i.e --boundary Content-Type: image/png; name="sig.png"

Using PHPMailer Results in many blocked emails

爱⌒轻易说出口 提交于 2019-12-13 16:14:02
问题 I am using PHPmailer; though probably a version from 2012 - I haven't updated it for a while. I am sending mail like this: $mail = new PHPMailer(); $mail -> IsSMTP(); $mail -> Host = "localhost"; $mail -> Port = 587; $mail -> SMTPAuth = true; $mail -> Username = EMAIL_USER; $mail -> Password = EMAIL_PASS; $mail -> From = EMAIL_USER; $mail -> FromName = "My Company"; $mail -> AddAddress($email); $mail -> AddReplyTo('<Same as "FROM">', 'User Name'); $mail -> IsHTML(true); $mail -> Subject =

HTML email guide

余生长醉 提交于 2019-12-13 14:31:28
问题 I am not new to HTML/CSS, although I have never created a HTML email before. Are there any nice online resources I can look at to learn from? What do I have to take into consideration when it comes to email clients? Do they display HTML/CSS content differently like browsers? (IE problems etc.) I am not even sure where the HTML/CSS is supposed to be inserted! 回答1: A HTML email newsletters guide from 2008 is here . Some email templates can be found here. And a really old site mentioning why

Structuring a table in an email

我怕爱的太早我们不能终老 提交于 2019-12-13 09:50:55
问题 I Have some data listed in a console application which was fetched from an email. After I send an email with all this listed data. The problem is the data is not coming structured in a nice way and the email isn't understandable. I tried using body html but failed. I was wondering if anyone could help me figure out how to structure the email. below is my code in c# using System; using System.Collections.Generic; using System.Data.SqlClient; using System.Linq; using System.Text; using System