How can I send an HTML email from a browser client? - email

I want to send an email in HTML to a user from browser client i.e send mail from Gmail, Yahoo, etc.
I paste the HTML I want to send in the text area, but the HTML is not getting rendered when I receive it.

HTML emails need a content-type: text/html header otherwise they are assumed to be plain text. You do not mention what language you are using, but if you are using PHP, you can use PHP Mailer to make sending HTML emails a little easier.

<textarea> tag is for user input. Users can't insert any data in mails, so this tag won't be rendered. If you just showing the information, use tag <p> instead.

http://www.labnol.org/internet/send-html-email/19672/
Be careful with how you use this though, GMail could very well blacklist you if your recipient list is too long. I use it all the time for tests.

Related

Direct mail (typo3) only content is send. Newsletter Layout not being send (page layout)

When I am sending a direct mail newsletter as a test, everything looks fine. But when I am sending a newsletter to users only the content without my wrapping template is being send. The user seeĀ“s only the content elements in the newsletter. My html template is missing.
By content, do you mean that users see only plain text? If so, it might be due to subscriptions preferences.
Based on your settings, both fe_users and tt_address may have a flag called "Recieve HTML mails" (can't recall the exact english version) which by default is not set.
Please let us know a bit more about your installation if this doesn't help :)

Show/Hide content in a Gmail email body

Our organization is completely on Gmail (Google Apps), and we are trying to figure out a way to show/hide content in the body of the email and have the recipient decide whether to show the content or collapse it to hide it.
The reason why we need to do this is because we send out generic emails in various languages, so we want the recipient to simply click on their language and have the email show the text in that language.
Things we want to avoid:
Sending multiple emails out in different language (and have to manage email recipients languages and multiple emails).
Display the content for all the languages one after another in the body of the email and have the user scroll down to their language.
One way I thought of doing this is by using Javascript to show/hide a div in the email that would hold the content for each language. For example, I would have an "English" hyperlink, a "Spanish" hyperlink, a "Chinese" hyperlink, etc and on click, the JS would show the div associated to the language that was clicked.
However, I was not able to get Javascript to run in Gmail when I sent a HTML email from an email client (Thunderbird).
The solution I'm looking for should ideally only require Gmail as some of the users do not have access to browse any other site outside of Gmail from their Chrome browser.
The simple solution would just be an HTML (no javascript) email with a "table of contents" at the top showing the various languages. Clicking a language in the table of contents would jump to that language's anchor in the HTML (and thus, the correct language message body).
The hard way to do this would be to write a Gmail contextual gadget:
https://developers.google.com/google-apps/gmail/contextual_gadgets
Options that don't work:
JavaScript doesn't work in Gmail
Pseudo-selectors aren't supported, so you can't do anything like :active td { height:100px }
display:none and visibility:invisible aren't supported
Ideas that might work
Point the image to your server, and get the HTTP headers. With a combination of HTTP_ACCEPT_LANGUAGE and the IP address, you should be able to serve up the appropriate image.
In Gmail labs, there is an option to add apps by XML. You could write an app that lets you do more advanced stuff, and tell your users to install that.
Personally, I wouldn't worry about just displaying the content one after the other. Put an index of the languages at the top of the email, with anchor links to the relevant language.

Can you send images in data:uri format to GMail?

I'm making a web app in Django that sends user an image to their email.
The way that seems most attractive to me for sending the image is in the data:uri format.
However, I tested sending this email with a data:uri image in it to my GMail account, and the email shows, but without the image!
I know that Chrome and Firefox can both open data:uri images. So it's not a browser problem. But I don't see the data:uri image in GMail at all.
Does GMail not support data:uri images? Or possibly I'm sending them wrong?
It's not supported.
Mail clients simply remove this from your post.
Here is a good reference of what can be supported:
http://www.campaignmonitor.com/css/
Not supported. It's also blocked in other clients like Outlook.
Some reasons:
help avoid viewing potentially offensive material
with low-bandwidth connections, blocking inline images allows the client to decide whether a particular image warrants the time and bandwidth required to download it
You can attach an image with the src attribute pointing to a separate part of the message using a Content ID (CID).
<img src="cid:imagecid"/>
--001a1141059012513a055a1b9499
Content-Type: image/jpeg
Content-Transfer-Encoding: base64
Content-ID: <imagecid>
R0lGODlhDwAPAKIEAP/ql9yuA...
--001a1141059012513a055a1b9499--

Some HTML attributes are not working in email.(border, cellspacing...)

Here's an email template with HTML.
And I tried to copy it in web browswer and paste in Outlook 2007.
But it looks different because border="0" cellpadding="0" cellspacing="0" doesn't work in email.
For the worse, it varies from the each email system(Outlook, Gmail, hanmail...).
Is there any way to work HTML perfectly in every email system?
Thanks, always.
=======================
This is what it should be.
And this is from DAUM Hanmail,
and Gmail.
You see, Html Email has its pros and cons, and these might even vary with the email client too.
Here are some known limitations (some might nolonger be true though):
Large email bodies may not be sent to NotifyLink devices as HTML when Smart Retrieval is enabled (NotifyLink Enterprise Server: Contol Option Rules) or the body size is set to a limit that does not accommodate the email body size. The email will sent in plain text.
Forwarding an HTML email from the device results in the forwarded email showing the original message twice, once in plain text and once in HTML format, when viewed on Oracle Beehive v1.5.x, Scalix, Sun, and Zimbra mail servers.
Using the Retrieve or Retrieve All options will not retrieve a full HTML picture email. This may be due to a bug with the BlackBerry OS v5.0.
An HTML message viewed on the device that includes a phone number will not allow the phone number to be selected for dialing.
The bodies of messages sent using ActiveSync's SmartForward or SmartReply commands will always be in plain text format.
Body text that has been copied and pasted from a MS Word document into emails sent to the device in HTML format are cut off when the email has been sent from a Kerio mail server.
Read more here...
How to Code Html Email correctly
And More Here...
I am afraid that not all email clients render HTML emails in the same way. Even between different version of Microsoft Outlook there are several differences.
You may find interesting the next article
http://www.campaignmonitor.com/css/
Hope this helps.

Prevent hyperlinks in HTML emails (namely Outlook)

We've got some HTML emails that get sent out that show email addresses our service has blocked. When viewing the email in Outlook (and presumably in other clients as well) these plain-text email addresses get turned into clickable links that would compose a new message to this address when clicked.
Is there a way to prevent this from happening? Perhaps a meta tag with a flag that would prevent Outlook from converting these into clickable links?
Most email clients strip out META tags, Javascript, and other types of code not necessary for email. Outlook is going to do what it wants with your email, so what you may want to do is wrap the addresses with your own anchor tag and use a blank HREF. Then, style the link to look like the rest of your text.
I think a better answer is to formulate anything that you think a mail client might try to generate a link for in a way that breaks up the string a bit like this: https://stackoverflow.com/a/7625887/470749