How can I add a signature into an Outlook email with JavaScript mailto? - Stack Overflow

I am using JavaScript mailto function to fill an email body with custom text.I can add text to the emai

I am using JavaScript mailto function to fill an email body with custom text.

I can add text to the email but the signature doesn't show up.

Is there any way to send a custom signature with an image using mail-to function? Or is there any way to insert an HTML image in the body when using the mail-to function?

Sample code:

var message = "text of message";                
var mailLInk = "mailto:[email protected]?subject=subject&body=" + message;        
document.location.href = mailLink;

I am using JavaScript mailto function to fill an email body with custom text.

I can add text to the email but the signature doesn't show up.

Is there any way to send a custom signature with an image using mail-to function? Or is there any way to insert an HTML image in the body when using the mail-to function?

Sample code:

var message = "text of message";                
var mailLInk = "mailto:[email protected]?subject=subject&body=" + message;        
document.location.href = mailLink;
Share Improve this question edited Apr 13, 2016 at 9:30 rook 6,2805 gold badges42 silver badges54 bronze badges asked Jun 14, 2011 at 17:42 DavidDavid 1,8612 gold badges14 silver badges12 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 2

Section 2 of RFC 2368 says that the body field is supposed to be in text/plain format, so you can't do HTML.

However even if you use plain text it's possible that some modern mail clients would render the resulting link as a clickable link anyway, though.

No, that information is stored in the outlook profile. Its up to Outlook (or some setting) on how to deal with the URL.

currently there is no way to send an html, because only plain text is accepted, and I can give you some tips why not to use mailto to send email:

Disadvantages of mailto in HTML

  1. Mail address can be read by spam bots
  2. Mailto only works if visitor have configured mail client
  3. HTML mailto screams "This site is developed by begginer"

There is only one advantage and its easy to create and implement into web site. But if you want to use it just encode your mail address so it can't be read with spam bots.

But if you want to add footer in your mail message, then just in your body parameter add %0A, %0A is new line and your cursor will blink there so ?body=%0AThen your footer text will give you footer in email.

:)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745221736a4617278.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信