javascript电子邮件发行 [英] javascript email linebreaks

查看:154
本文介绍了javascript电子邮件发行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用javascript发送电子邮件。它将通过展望发送,但我似乎无法接受线路破损的展望。它将它们识别为换行符,因为它不显示它们。但没有换行符是可见的。我已经看到这个展望明显地消除了额外的换行符。我已经尝试了几件我读过的东西来解决这个问题,但没有用。





尝试所有的东西。没有什么工作...

  mailto_link ='mailto:'+ email _'?subject ='+ subject +'& body- + body_message; 
window.open(mailto_link,'emailWindow');

这是我用来创建电子邮件的方法。如果有一个更好的解决方案或某种方式来强制接受html编辑,那么也可以。

解决方案

%0D%0A 序列在 body_message 变量



编辑:请参阅如何在JavaScript中断行?


I'm sending an email using javascript. It will be sent via outlook but I can't seem to get outlook to accept the linebreaks. It recognizes them as line breaks since it doesn't display them. But no line breaks are visible. I've read that outlook apparently removes extra line breaks. I've tried several things I've read to get around this but to no avail

How do I format a String in an email so Outlook will print the line breaks?

Tried everything there. Nothing works...

mailto_link = 'mailto:'+email_'?subject='+subject+'&body-'+body_message;
window.open(mailto_link, 'emailWindow');

That's the method I'm using to create the e-mail. If there is a better solution or some way to force outlook to accept html editing, that would work too.

解决方案

try to force newline with %0D%0A sequence in the body_message variable

edit: see How to break line in JavaScript?

这篇关于javascript电子邮件发行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆