当正文包含回车符和换行符时,如何使用 blat 从命令行发送电子邮件?

发布于 2024-07-12 13:06:03 字数 554 浏览 7 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

夏日浅笑〃 2024-07-19 13:06:04

如果您想全部内联完成,请使用“|” 特点

-body 1st line|second line|third line

If you want to do it all inline use the '|' character

-body 1st line|second line|third line
尝蛊 2024-07-19 13:06:04

您可以将正文放入文本文件中并让 blat 发送:

blat [text file here] -to [email protected] -subject "[DEV] PO Detail Report" -attach "C:\TXT\PODetail_26879.csv" -log
C:\EMAIL.LOG\20090129.TXT -timestamp'

You can put the body in a text file and have blat send that:

blat [text file here] -to [email protected] -subject "[DEV] PO Detail Report" -attach "C:\TXT\PODetail_26879.csv" -log
C:\EMAIL.LOG\20090129.TXT -timestamp'
公布 2024-07-19 13:06:04

只需使用邮件警报简单邮件程序:
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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文