Dynamic content in outlook email messages - html

I need to have a button in my outlook message that displays an image (inside the message itself) when clicked. I tried to put a HTML with Javascript handling onclick event, but scripts wont work inside outlook emails. What can I do to get it done?
Thanks

JavaScript does not run in emails, it would be a security risk (and an annoyance). You are actually very restricted on most clients, when I was styling a newsletter for a client I had to resort to table layouts.
The best you can do is put a link in the email which will redirect the user to a web page.

Related

Is it possible to have a form/questionnaire inside a marketing html email?

I am wondering how I can place a small form/questionnaire inside a marketing email that I am sending out? With no php or javascript available I am wondering if there are ways this can be done.
Having tried this myself, allow me to share my experience.
There is nothing stopping you from actually making an HTML Form inside an e-mail, but there are many e-mail clients out there. Some of them block "interactive" HTML, in particular, buttons. And you need a submit button to send your data.
In my job, we have implemented a new feature that allowed users to sign confidential documents by clicking a button on their e-mail. The email had a simple HTML form with a few elements which identified the document to be signed. By pressing a submit button, the form did a POST submit to the server, opened the user's browser and directed him to the web site to sign. This worked for a while, until we had a customer using it via Outlook Web Mail. They claimed the system generated e-mails did not have a button they could push. After investigating, we discovered what I mentioned above. We ended up changing the button for a hyperlink. The information identifying the document now is attached to that link, and the link has been styled to look like a button. Links play well inside e-mails. Buttons don't. Hope this helps.

How to stop css embedded in an email affecting the whole page

My web application records emails sent from third party applications such as Outlook in a timeline using the maillin node.js framework. It all works as intended with one major problem. When a user clicks on an email to view it, the css embedded in the email affects the whole page. I know I could get around this by opening the email in an iframe, or just loading the text. But I was just wondering if there was any other way to isolate the css and stop it infecting the page.
Edit.
I should have mentioned the the main application is C# .Net MVC
I solved this by converting the email to an image, I have a licence for a commercial application that converts html to an image (I won't advertise it), and at the end of the day users just need to see the email. Thanks for your responses anyway.

Mailto Link Not Working in Hotmail

So I have an html email that I am creating for my company for an email campaign we are going to be sending soon for an organization we represent. It contains 2 primary links, one to email a person at the organization we represent, and one to go to the landing page on the site of the organization. The landing page link works fine, the mailto: link does not when the email is viewed from Hotmail. It works on other clients besides Hotmail including Gmail and Outlook.
This is not because the computer which I am testing on does not have an email client installed. It has Outlook 2010 installed and registered as the mailto application. When mailto links are clicked on other sites (not hotmail) they work great...outlook launches a new message window as it should and fills in the subject and email. When we went to test on Hotmail, it shows the mailto link in the status bar, but no action occurs when you click the link. It's as if the link was not a link at all.
This is the link we are trying to use: (edited slightly for privacy)
<div class="button">Email a Resident Advisor</div>
This is placed within an html table cell. It has some basic css styling applied (all embedded in the html email itself). The button class is just designed to make the link stand out in the email...give it a red border and bold the link.
To be much more clear:
Works:
Gmail - IE9, Chrome, Firefox
Outlook - worked.
Does not work:
Hotmail - All browsers tried
The email was sent using the preview function of CampaignMonitor (handled by our QA guy, I don't have access to it as I'm rather new to the company).
I just need to figure out a way to make this work. Thanks in advance.
Two other programmer and I spent 2 days dealing with this problem earlier this week. I don't have the relevant links handy, but the long and short of the story is that this is a known issue and currently unresolved.
mailto: links will under no circumstance, work in Hotmail, they are removed or something.
We ultimately ended up adding copy instructing recipients to email foo#mail.com in lieu of clicking the link.
Here's a possible solution I found at http://windowsxp.mvps.org/hmposturl.htm that I modified for my purposes. It would require sending unique creative with a custom link to only your Hotmail recipients but it seems to work for me. Here's the href string I used:
http://www.hotmail.msn.com/secure/start?action=compose&to=email#domain.com&subject=My Subject Line&body=Email Body
This is a common problem with most webmail based systems. mailto: doesn't invoke them. Google mailto hotmail and you will find answers for Windows and for specific browsers. I think this will set it up for you
http://email.about.com/od/windowslivehotmailtips/qt/How_to_Make_Windows_Live_Hotmail_Your_Default_Email_Program.htm
Just add target='_blank'...use the 'a' html tag as...
<a href='mailto:Your MAILTO ID' target='_blank'>SOME Support</a>
This works in hotmail client, but it launch new browser instance additionally.
Known problem, I can confirm, is not working on Hotmail web mail only, rest of them work fine, we had the same problem here and we give up trying.
If you really really want that the only way is to use JavaScript, onClick change window location but that introduces a new dependency: JavaScript.

HTML Email - Button as a Form in an Email

Wondering if it is ok to have a form inside an HTML email. All i would be doing is having an image input submit to a paypal buy page. I would like it to go right to paypal without going to a marketing page first...
I would have the whole form that paypal requires for a button.
You'll need to make sure the Content-Type of the email is set to text/html and the recipient's email client will have to support HTML emails, other than that I should mostly be fine.
Most email clients do not support forms within them, this includes outlook 2007, ideally if you can have this as a link behind a image is better as then you will get more support across email clients.

Embed HTML form in email

Can I send an email that contains an HTML form with one combobox, that upon changing the value a reply would be send back?
From the research I've made it seems that it is not possible...
http://en.wikipedia.org/wiki/HTML_e-mail
Is that true?
Thanks,
Eden
Yes it is possible.
But there are restrictions.Different mail clients and web mails behave in different manners.
For example, Yahoo web mail, upon submitting form brings up a dialog box which warns about sending some info outside Yahoo. You have to disable Javascript if you want your submission work properly, otherwise it doesn't send submit buttons by REQUEST (POST or GET).
In outlook express I checked and it works without any problem.
Because of this problem, I think it isn't recommendable to do form embedding inside email. I suggest to make a web form and send a link to it via email. Although by this approach you may lose some lazier users, but it seems that lose will be lesser than lose arising from problems of email embedded form submission.
Yes that is true. It is not possible. What you can do is provide a link to a webpage and do the combobox action on that website.
You can create a form in google docs and share it via 'email', I have tested it and it shown inline at-least in gmail.
https://docs.google.com/forms