Rama Rao M
Rama Rao M

Reputation: 3051

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

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.

Upvotes: 2

Views: 6972

Answers (3)

Neha Sharma
Neha Sharma

Reputation: 31

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">
                <a href="https://www.google.co.in/" target="_blank" style="text-decoration:none; color:#FFFFFF">Search Google</a>
            </td>
        </tr>
    </tbody>
</table>

Upvotes: 1

Domenik Reitzner
Domenik Reitzner

Reputation: 1613

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

Upvotes: 1

Jack
Jack

Reputation: 21

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.

Upvotes: 2

Related Questions