{"id":3057,"date":"2018-08-14T18:46:11","date_gmt":"2018-08-14T10:46:11","guid":{"rendered":"http:\/\/www.daliane.com\/?p=3057"},"modified":"2018-08-14T18:46:11","modified_gmt":"2018-08-14T10:46:11","slug":"mailto_de_body_chao_da_fa_song_ban_fa","status":"publish","type":"post","link":"http:\/\/www.daliane.com\/category\/jinjiaoyou\/mailto_de_body_chao_da_fa_song_ban_fa\/","title":{"rendered":"mailto\u7684body\u8d85\u5927\u53d1\u9001\u529e\u6cd5"},"content":{"rendered":"<p><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">\u5927\u5bb6\u77e5\u9053\uff0cmailto\u662f\u7f51\u9875\u8bbe\u8ba1\u5236\u4f5c\u4e2d\u7684\u4e00\u4e2a\u975e\u5e38\u5b9e\u7528\u7684html\u6807\u7b7e\uff0c\u8bb8\u591a\u62e5\u6709\u4e2a\u4eba\u7f51\u9875\u7684\u670b\u53cb\u90fd\u559c\u6b22\u5728\u7f51\u7ad9\u7684\u9192\u76ee\u4f4d\u7f6e\u5904\u5199\u4e0a\u81ea\u5df1\u7684\u7535\u5b50\u90ae\u4ef6\u5730\u5740\uff0c\u8fd9\u6837\u7f51\u9875\u6d4f\u89c8\u8005\u4e00\u65e6\u7528\u9f20\u6807\u5355\u51fb\u4e00\u4e0b\u7531mailto\u7ec4\u6210\u7684\u8d85\u7ea7\u8fde\u63a5\u540e\uff0c\u5c31\u80fd\u81ea\u52a8\u6253\u5f00\u5f53\u524d\u8ba1\u7b97\u673a\u7cfb\u7edf\u4e2d\u9ed8\u8ba4\u7684\u7535\u5b50\u90ae\u4ef6\u5ba2\u6237\u7aef\u8f6f\u4ef6\uff0c\u4f8b\u5982OutLook Express\u4ee5\u53caFoxmail\u7b49\u3002&nbsp;<\/span><\/p>\n<p><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">\u4f46\u662f\u7531\u4e8e\u5404\u64cd\u4f5c\u7cfb\u7edf\u548c\u90ae\u4ef6\u5ba2\u6237\u7aef\u5bf9 mailto \u4e8b\u4ef6\u8fde\u63a5\u7684\u5904\u7406\u4e0d\u4e00\u81f4\uff0c\u6240\u4ee5\u5728\u5b9e\u9645\u5e94\u7528\u7684\u65f6\u5019\u9700\u8981\u6ce8\u610f\uff1b&nbsp;<\/span><\/p>\n<p><strong>1.\u57fa\u672c\u8bed\u6cd5<\/strong><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">&nbsp;<\/span><\/p>\n<p><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">&lt;a href=mailto:test@163.com&gt;send email&lt;\/a&gt;&nbsp;<\/span><\/p>\n<p><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">\u6216\u8005\u3000\u3000&nbsp;<\/span><\/p>\n<p><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">&lt;form action=&#8221;mailto:test@163.com&#8221;&gt;&nbsp;<\/span><\/p>\n<p><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">&lt;\/form&gt;&nbsp;<\/span><\/p>\n<p><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">\u53c2\u6570\u5217\u8868\uff1a&nbsp;<\/span><\/p>\n<table class=\"jbborder\" style=\"border:currentcolor;text-align:center;color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">\n<tbody>\n<tr>\n<td style=\"border:1px solid #CCCCCC;text-align:left;\">\n\t\t\t\tto\n\t\t\t<\/td>\n<td style=\"border:1px solid #CCCCCC;text-align:left;\">\n\t\t\t\t\u6536\u4fe1\u4eba\uff08\u591a\u4e2a\u4e4b\u95f4\u7528;\u5206\u5272\uff09\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #CCCCCC;text-align:left;\">\n\t\t\t\tsuject\n\t\t\t<\/td>\n<td style=\"border:1px solid #CCCCCC;text-align:left;\">\n\t\t\t\t\u4e3b\u9898\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #CCCCCC;text-align:left;\">\n\t\t\t\tcc\n\t\t\t<\/td>\n<td style=\"border:1px solid #CCCCCC;text-align:left;\">\n\t\t\t\t\u6284\u9001\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #CCCCCC;text-align:left;\">\n\t\t\t\tbcc\n\t\t\t<\/td>\n<td style=\"border:1px solid #CCCCCC;text-align:left;\">\n\t\t\t\t\u6697\u6284\u9001\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #CCCCCC;text-align:left;\">\n\t\t\t\tbody\n\t\t\t<\/td>\n<td style=\"border:1px solid #CCCCCC;text-align:left;\">\n\t\t\t\t\u5185\u5bb9\uff08\u90e8\u5206\u90ae\u4ef6\u5ba2\u6237\u7aef\u652f\u6301html\u683c\u5f0f\u8bed\u53e5\uff09\n\t\t\t<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">\u53c2\u6570\u4f20\u9012\u65b9\u5f0f\u540c\u9875\u9762\u4e4b\u95f4\u4f20\u9012\u503c\u4e00\u6837\uff0c\u53ef\u4ee5\u4f7f\u7528\u94fe\u63a5\u5b57\u7b26\u4e32\uff0c\u4e5f\u53ef\u4ee5\u7528form&nbsp;<\/span><\/p>\n<p><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">\u94fe\u63a5\u5b57\u7b26\u4e32&nbsp;<\/span><\/p>\n<p><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">&lt;a href=&#8221;mailto:test@163.com?subject=testtitle&amp;cc=test@126.com&amp;body=this is body&#8221;&gt;send mail&lt;\/a&gt;&nbsp;<\/span><\/p>\n<p><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">form\u65b9\u5f0f&nbsp;<\/span><\/p>\n<div class=\"msgheader\" style=\"margin:3px auto 0px;padding:0px 3px;background:#F6FBFF;color:#222222;font-family:tahoma, arial, &quot;\">\n<div class=\"right\" style=\"margin:0px;padding:0px;font-size:14px;\">\n\t\t<span style=\"line-height:25.2px;\"><u>\u590d\u5236\u4ee3\u7801<\/u><\/span>\n\t<\/div>\n<p>\u4ee3\u7801\u5982\u4e0b:\n<\/p><\/div>\n<div class=\"msgborder\" id=\"phpcode20\" style=\"margin:0px auto 3px;padding:0px 3px;font-size:14px;background:#DDEDFB;color:#222222;font-family:tahoma, arial, &quot;\">\n\t<br \/>\n&lt;form name=&#8217;sendmail&#8217; action=&#8217;mailto:test@163.com&#8217;&gt;&nbsp;<br \/>\n&lt;input name=&#8217;cc&#8217; type=&#8217;text&#8217; value=&#8217;test@hotmail.com&#8217;&gt;&nbsp;<br \/>\n&lt;input name=&#8217;subject&#8217; type=&#8217;text&#8217; value=&#8217;testtitle&#8217;&gt;&nbsp;<br \/>\n&lt;input name=&#8217;body&#8217; type=&#8217;text&#8217; value=&#8217;this is body&#8217;&gt;&nbsp;<br \/>\n&lt;\/form&gt;\n<\/div>\n<p>\n<strong>2.\u90ae\u4ef6\u5ba2\u6237\u7aef\u533a\u522b<\/strong><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">&nbsp;<\/span><\/p>\n<p><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">\u4e0a\u9762\u662fmailto\u7684\u7b80\u5355\u8bed\u6cd5\u5e94\u7528\uff1b\u4f46\u5728\u5b9e\u9645\u5e94\u7528\u4e2d \u6839\u636e\u6d4f\u89c8\u5668\u8bbe\u7f6e\u7684\u6d4f\u89c8\u5668\u5ba2\u6237\u7aef\u4e0d\u540c\uff0c\u4f1a\u6709\u4e0d\u7528\u6548\u679c\uff1b&nbsp;<\/span><\/p>\n<p><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">\u5c24\u5176\u662f\u5728body \u5185\u5bb9\u5305\u542bhtml \u683c\u5f0f\u7684\u8bed\u53e5\u65f6\u5019\uff0c\u8fd9\u65f6\u5019\u9700\u8981\u6ce8\u610f\uff1b&nbsp;<\/span><\/p>\n<p><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">outlook \u662f\u5bf9body \u7684html \u8bed\u53e5\u539f\u6837\u5c55\u793a\uff08\u5bf9body\u7684html \u8fdb\u884c escape \u540e\u4e5f\u662f\u540c\u6837\u7684\u65e0\u6548\uff09\uff0c\u90a3\u4e48\u6211\u4eec\u5728outlook mailto \u65f6\u5019\u60f3body \u91cc\u9762\u7684\u8bed\u53e5\u6362\u884c\u600e\u4e48\u529e \u5462\uff1f&lt;br\/&gt; \u662f\u6ca1\u6709\u6548\u679c\u7684\u3002\u3002\u9700\u8981\u7528 %0D \u5b57\u7b26\u4f5c\u4e3a\u6362\u884c\u7b26\u53f7\uff1b&nbsp;<\/span><\/p>\n<p><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">foxmail \u662f\u4f1a\u5bf9body\u7684html \u8bed\u53e5\u5c55\u793a\u5176html \u5bf9\u5e94\u7684\u6548\u679c\uff1b&nbsp;<\/span><\/p>\n<p><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">\u5f53\u7136\u4e5f\u53ef\u4ee5\u6362\u53e6\u4e00\u79cd\u65b9\u5f0f,\u5b9e\u73b0\u7c7b\u578bmailto\u7684\u5ba2\u6237\u7aef\u53d1\u9001\u90ae\u4ef6\uff1a&nbsp;<\/span><\/p>\n<div class=\"msgheader\" style=\"margin:3px auto 0px;padding:0px 3px;background:#F6FBFF;color:#222222;font-family:tahoma, arial, &quot;\">\n<div class=\"right\" style=\"margin:0px;padding:0px;font-size:14px;\">\n\t\t<span style=\"line-height:25.2px;\"><u>\u590d\u5236\u4ee3\u7801<\/u><\/span>\n\t<\/div>\n<p>\u4ee3\u7801\u5982\u4e0b:\n<\/p><\/div>\n<div class=\"msgborder\" id=\"phpcode21\" style=\"margin:0px auto 3px;padding:0px 3px;font-size:14px;background:#DDEDFB;color:#222222;font-family:tahoma, arial, &quot;\">\n\t<br \/>\nfunction SendMail(filePath) {&nbsp;<br \/>\nvar path = location.href.substring(0, location.href.lastIndexOf(&#8220;\/&#8221;)) + filePath;&nbsp;<br \/>\nvar outlookApp = new ActiveXObject(&#8220;Outlook.Application&#8221;);&nbsp;<br \/>\nvar nameSpace = outlookApp.getNameSpace(&#8220;MAPI&#8221;);&nbsp;<br \/>\nvar mailItem = outlookApp.CreateItem(0);&nbsp;<br \/>\nvar mailto = &#8220;test@163.com &#8220;;&nbsp;<br \/>\nvar mailBody= &#8220;&lt;HTML&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT color=\u2018red\u2019&gt;test this is body html&lt;\/FONT&gt;&lt;\/DIV&gt;&lt;\/BODY&gt;&lt;\/HTML&gt;&#8221;;&nbsp;<br \/>\nmailItem.Subject = &#8220;test title&#8221;;&nbsp;<br \/>\nmailItem.To = mailto;&nbsp;<br \/>\nmailItem.HTMLBody = mailBody;&nbsp;<br \/>\nif (path != &#8220;&#8221;) {&nbsp;<br \/>\nmailItem.Attachments.Add(path);&nbsp;<br \/>\n}&nbsp;<br \/>\nmailItem.Display(0);&nbsp;<br \/>\nmailItem = null;&nbsp;<br \/>\nnameSpace = null;&nbsp;<br \/>\noutlookApp = null;&nbsp;<br \/>\n}\n<\/div>\n<p>\n<span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">\u4f46\u662f\u8fd9\u4e2a\u6709\u4e2a\u5f88\u5927\u7684\u7f3a\u70b9\u662f\uff1a\u4ec5\u4ec5\u652f\u6301outlook \u5ba2\u6237\u7aef\uff0c\u9700\u8981\u5bf9Internet\u9009\u9879\u8fdb\u884c\u914d\u7f6e\uff0c\u201d\u5bf9\u6ca1\u6709\u6807\u8bb0\u4e3a\u5b89\u5168\u7684ActiveX\u63a7\u4ef6\u8fdb\u884c\u521d\u59cb\u5316\u548c\u811a\u672c\u8fd0\u884c\u201c\u8981\u542f\u7528\u3002&nbsp;<\/span><\/p>\n<p><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">\u5176\u4e2d\u8c03\u7528mailItem\u7684Attachments.Add\u662f\u5411\u90ae\u4ef6\u4e2d\u6dfb\u52a0\u9644\u4ef6\uff0c\u6ca1\u6709\u9644\u4ef6\u7684\u65f6\u5019\u5c31\u53ef\u4ee5\u628afilePath\u8fd9\u4e2a\u53c2\u6570\u5220\u6389\u3002&nbsp;<\/span><\/p>\n<p><span style=\"color:#222222;font-family:tahoma, arial, &quot;font-size:14px;background-color:#FFFFFF;\">\u5982\u679c\u9700\u8981\u6dfb\u52a0\u6284\u9001\u5bf9\u8c61\uff0c\u53ef\u4ee5\u8c03\u7528mailItem.Cc,\u82e5\u662f\u9700\u8981\u6dfb\u52a0\u4e00\u4e2a\u6697\u9001\u5bf9\u8c61\u53ef\u4ee5\u8c03\u7528mailItem.Bcc\u65b9\u6cd5\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u5bb6\u77e5\u9053\uff0cmailto\u662f\u7f51\u9875\u8bbe\u8ba1\u5236\u4f5c\u4e2d\u7684\u4e00\u4e2a\u975e\u5e38\u5b9e\u7528\u7684html\u6807\u7b7e\uff0c\u8bb8\u591a\u62e5\u6709\u4e2a\u4eba\u7f51\u9875\u7684\u670b\u53cb\u90fd\u559c\u6b22\u5728\u7f51\u7ad9\u7684\u9192\u76ee\u4f4d&#8230;<\/p>\n","protected":false},"author":2,"featured_media":228,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[8],"tags":[217],"_links":{"self":[{"href":"http:\/\/www.daliane.com\/category\/jinjiaoyou\/wp-json\/wp\/v2\/posts\/3057"}],"collection":[{"href":"http:\/\/www.daliane.com\/category\/jinjiaoyou\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.daliane.com\/category\/jinjiaoyou\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.daliane.com\/category\/jinjiaoyou\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.daliane.com\/category\/jinjiaoyou\/wp-json\/wp\/v2\/comments?post=3057"}],"version-history":[{"count":1,"href":"http:\/\/www.daliane.com\/category\/jinjiaoyou\/wp-json\/wp\/v2\/posts\/3057\/revisions"}],"predecessor-version":[{"id":3058,"href":"http:\/\/www.daliane.com\/category\/jinjiaoyou\/wp-json\/wp\/v2\/posts\/3057\/revisions\/3058"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.daliane.com\/category\/jinjiaoyou\/wp-json\/wp\/v2\/media\/228"}],"wp:attachment":[{"href":"http:\/\/www.daliane.com\/category\/jinjiaoyou\/wp-json\/wp\/v2\/media?parent=3057"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.daliane.com\/category\/jinjiaoyou\/wp-json\/wp\/v2\/categories?post=3057"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.daliane.com\/category\/jinjiaoyou\/wp-json\/wp\/v2\/tags?post=3057"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}