当正文包含回车符和换行符时,如何使用 blat 从命令行发送电子邮件?
我有一个 Windows 服务器,它通过 BASIC 程序向我发送电子邮件。 如果邮件正文包含回车符/换行符,则电子邮件永远不会完成。 仅第一行发送给我。 我尝试用 \n 替换它们,但这并没有帮助,因为我收到的电子邮件中包含 \n 。 有任何想法吗?
这是我正在使用的命令:
blat -to [email protected] -subject "[DEV] PO Detail Report" -body "Attached file
is ready for import.
From 01/01/09 to 01/29/09
PO Status not egual to 'C'" -attach "C:\TXT\PODetail_26879.csv" -log
C:\EMAIL.LOG\20090129.TXT -timestamp'.
I have a windows server which sends emails to me through a BASIC program. If the message body contains carriage returns/line feeds then the email never finishes. Only the first line is sent to me. I tried replacing them with \n but that didn't help as the email came to me with the \n in it. Any ideas?
Here is the command I'm using:
blat -to [email protected] -subject "[DEV] PO Detail Report" -body "Attached file
is ready for import.
From 01/01/09 to 01/29/09
PO Status not egual to 'C'" -attach "C:\TXT\PODetail_26879.csv" -log
C:\EMAIL.LOG\20090129.TXT -timestamp'.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您想全部内联完成,请使用“|” 特点
If you want to do it all inline use the '|' character
您可以将正文放入文本文件中并让 blat 发送:
You can put the body in a text file and have blat send that:
只需使用邮件警报简单邮件程序:
https://sourceforge.net/projects/mail-alert/
MailAlert.exe -r < a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="462722223423353506233e272b362a236825292b">[电子邮件受保护] -b "@Your_Directory\File_with_Mail_Body.txt"
您还可以将 HTML 文件作为电子邮件正文附加(请记住在这种情况下更改 PlaintextOnly=no)。
Just use Mail Alert Simple Mailer:
https://sourceforge.net/projects/mail-alert/
MailAlert.exe -r [email protected] -b "@Your_Directory\File_with_Mail_Body.txt"
You can also attach HTML file as an email body (remember to change PlaintextOnly=no in such a case).