philosophaie — 2013-12-20T04:23:32-05:00 — #1
I was wondering if it is possible to put a html button on an email page that would when clicked send you to a website: www.mysite.com.
msg.Subject = "Welcome Session Member"
msg.From = fromAdd
msg.IsBodyHtml = True
msg.Priority = MailPriority.Normal
msg.BodyEncoding = Encoding.Default
msg.body="<input id="Button1" type="button" value="Website" onclick=somefunction("www.mysite.com") />"
or something like this..
ralphm — 2013-12-20T08:32:03-05:00 — #2
Your question isn't all that clear. Are just just trying to place a link in an email?
mittineague — 2013-12-20T18:00:07-05:00 — #3
You can put links though. So I suppose you could link around an image of a button.
But if the user is taken out of their email window unexpectedly they might get a bit miffed.
francky — 2013-12-20T19:30:06-05:00 — #4
I think the question is: a link with the appearance of a button, like a submit button in a html page.
of a html element is for use in a html-browser. But not all email visitors use "browser-mail" (as Google-mail), some use e-mail programs (like Outlook, Thunderbird). E-mail programs aren't browsers, and have a bad html support.
Often the e-mail client doesn't show images, so I think an image-button is not reliable.
You can try a "[[U]Bulletproof Email Button[/U]", or the "[URL="http://www.industrydive.com/blog/how-to-make-html-email-buttons-that-rock/"][U]How to make HTML email buttons that rock[/U]](http://www.developerdrive.com/2012/05/creating-bulletproof-email-buttons/)", which has the same principle: an old-fashioned table model with a styled link in a cell.
If you follow them with a more html button-like design, you'll get something like this:
mittineague — 2013-12-20T19:52:18-05:00 — #5
Excellent point about email clients and images. Mine only initially blocks images for emails not in my whitelist, but there's no accounting for others.
I like the CSS solution a lot. Do you know if the email client doesn't support "border-radius" if it would show OK except without the "rounded corners"?
francky — 2013-12-20T20:31:40-05:00 — #6
I don't know for sure what e-mail clients are doing, but the css rule is that if something is not supported, it will be denied (just like an error).
So I should trust that the fall back is rectangle corners.
But a live check is never for nothing.