How to display html button element in MS-Outlook 2010? - email

I have written a mailing program. The body of the mail is pure html.
All elements of the html (like a, span, p, img tags etc.) are shown in the mail output in MS Outlook 2010 except the button.
Only text (button's value) is displayed as a plain text. Even javascript event is not triggered if button has onClick event.
Note: It is working in other mailing services like gmail, yahoo. Problem is in Outlook only.

I'm not sure versions of MS Outlook 2007 onwards can handle HTML buttons, due to them using MS Words HTML processor (Which is not the best...)
As to trying to use javascript in emails - Javascript click event in outlook 2007
Ive had similar problems...
Jack.

javascript is blocked by email clients, as it is not save.
There are some solutions that more or less work in outlook:
https://litmus.com/blog/a-guide-to-bulletproof-buttons-in-email-design

Please use below mentioned HTML code this works perfectly well in outlook.
<table cellpadding="0" align="left" cellspacing="0" style="border-radius:2px; background-color:#5794FF; color:#FFFFFF">
<tbody>
<tr>
<td align="center" height="32" style="padding:0px 19px; height:32px; font-size:14px; line-height:12px">
Search Google
</td>
</tr>
</tbody>
</table>

Related

table has inside div press delete table my div element deleted in TinyMCE

I am using TinyMCE
I create my editor div element (selector) inside table element. Then I click delete table the div element is deleted.
<table>
<tr>
<td> <div class="tinymce-body">
<p>Here are some of our customer’s most common use cases for TinyMCE:</p>
<ul>
<li>Content Management systems (<em>e.g. WordPress, Umbraco</em>)</li>
<li>Learning Management Systems (<em>e.g. Blackboard</em>)</li>
<li>Customer Relationship Management and marketing automation (<em>e.g. Marketo</em>)</li>
<li>Email marketing (<em>e.g. Constant Contact</em>)</li>
<li>Content creation in SaaS systems (<em>e.g. Eventbrite, Evernote, GoFundMe, Zendesk</em>)</li>
</ul>
<p>And those use cases are just the start. TinyMCE is incredibly flexible, and with hundreds of APIs there’s likely a solution for your editor project. If you haven’t experienced Tiny Cloud, get started today. You’ll even get a free trial of our premium plugins – no credit card required!</p> </div> </td>
</tr>
</table>
<script type="text/javascript">
tinymce.init({
selector: ".tinymce-body",
inline: true,
plugins: 'table',
toolbar: 'table'});
</script>
Code: https://fiddle.tiny.cloud/zhfaab/3
See Image
How to stop to this. Only allowed to delete 'inside the div element' created tables.
Thanks.
FYI for anyone reading this, it's a bug

href link with phpmailer is erased

I am using phpmailer to send an email with a button that has a link to another page. For some reason it works almost everytime, except with one specific client of mine. Apperantly his email has is hotmail or outlook.
What happens in this case is that the button comes with a blanked link.
The following peace of code might help:
$mensagem .= '<br><div><!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="http://" style="height:40px;v-text-anchor:middle;width:200px;" arcsize="8%" stroke="f" fillcolor="#b1cef1">
<w:anchorlock/>
<center>[enter image description here][1]
<![endif]-->
<a href="http://conazweb.com.br/follow-up/'.$opcao1_file.'"
style="background-color:#b1cef1;border-radius:3px;color:#ffffff;display:inline-block;
font-family:sans-serif;font-size:15px;font-weight:bold;line-height:40px;text-align:center;
text-decoration:none;width:300px;margin-left: 15%; margin-right: 15%;-webkit-text-size-adjust:none;">COMPRAR VIA CONAZ</a>
<!--[if mso]>
</center>
</v:roundrect>
<![endif]--></div>';
By doing a code inspection on the button on the case that the problem is occuring I got the following code:
https://www.dropbox.com/s/dtyhtrvdk0nas5d/Inspection%20button.png?dl=0
This is ancient Microsoft VML, essentially nothing uses it any more, and support has even been dropped from Internet Explorer. If you want links to work, use plain links, which you can style to look like buttons.

see "View in Browser" action directly for html email in Outlook 2010

In outlook 2010 (Windows 7), for some html email, I can see the "View in Browser" action directly like below
While for some html emails, I can't see this directly, I have to select it from menu
Do you know which part of the html triggered this ?
Reason behind it is to make sure people using outlook 2010 have chance to see better email.
Add this line of HTML at the bottom of the document before the closing body tag.
<span style="padding: 0px;"></span>

Are images in HTML Mail getting replaced?

Is it possible that several mail applications (e.g. Hotmail, Thunderbird, OSx Mail) replace the whole <img> tag?
In the generated newsletter i have e.g.:
<img style="padding: 0px 10px 0px 0px; outline: none; " class="editor-img" src="/upload/11/2_5.jpg" alt="image" width="165" height="107">
and in the received newsletter i got something like:
<img src="foo" border="0">
Can someone explain me that and how i can prevent this?
Thanks
Yes this is absolutely possible. For instance T-Online in Germany exchanges images ending on .php with a dummy image. Many webmailers parse and adapt email code before it is finally rendered in the inbox. Like Gmail tel:-links numbers of which it thinks it's a phone number. In your case, the relative path doesn't make any sense. Try an absolute image path like src="http://www.YOURDOMAIN/upload/11/2_5.jpg".

Inserting page breaks in HTML email

I'm trying to place a page break into an HTML email using the following code but this does two things when I view the email in Outlook.
It ignores the line breaks in the 2nd table (only a problem with Outlook) and it does not page break (a problem in all non-web based email clients)!
Does anyone know how I can code this?
<table>
<tr>
<td>test<br>test<br>test</td>
</tr>
</table>
<table style="page-break-before:always;">
<tr>
<td>me<br>me<br>me</td>
</tr>
</table>
send them a document instead of HTML, or link them to a page that contains your email HTML
I think you'll end up pulling out too much hair trying to get what you're doing to work correctly, especially as newer versions of email clients come out.