jquery - Display outlook with javascript with html body -
i'm working on asp.net mvc5 project, , need display outlook when clicking on button in view, content of email should int html.
i've tried using mailto, doesnt not support html content, need know if there way
thanks
well, if want add line breaks, possible, evidenced in answer:
relevant part:
if able use javascript "encodeuricomponent()" might of use below...
var formattedbody = "firstline \n second line \n third line"; var mailtolink = "mailto:x@y.com?body=" + encodeuricomponent(formattedbody); window.location.href = mailtolink;
otherwise, if want solution full monty (images, tables, ...) in y our e-mail, you're out of luck simple "mailto" link.
then you'll have think of way construct e-mail via asp.net , send using system.net.mail namespace. perhaps can use asp.net load in html template of e-mail, set fields right text (with string.replace example) , allow user click send button (still in browser) or send automatically if there no user action required.
Comments
Post a Comment