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?
我有一个Windows服务器,通过BASIC程序向我发送电子邮件。如果邮件正文包含回车符/换行符,则电子邮件永远不会完成。只有第一行发给我。我尝试用\ n替换它们但是这并没有帮助,因为电子邮件来了我的\ n in。有任何想法吗?
Here is the command I'm using:
这是我正在使用的命令:
blat -to mike.roosa@toltsg.com -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'.
3 个解决方案
#1
If you want to do it all inline use the '|' character
如果你想全部内联使用'|'字符
-body 1st line|second line|third line
#2
You can put the body in a text file and have blat send that:
你可以将正文放在一个文本文件中并让blat发送:
blat [text file here] -to mike.roosa@toltsg.com -subject "[DEV] PO Detail Report" -attach "C:\TXT\PODetail_26879.csv" -log
C:\EMAIL.LOG\20090129.TXT -timestamp'
#3
Just use Mail Alert Simple Mailer: https://sourceforge.net/projects/mail-alert/
只需使用Mail Alert Simple Mailer:https://sourceforge.net/projects/mail-alert/
MailAlert.exe -r address@example.com -b "@Your_Directory\File_with_Mail_Body.txt"
MailAlert.exe -r address@example.com -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).
您还可以将HTML文件作为电子邮件正文附加(请记住在这种情况下更改PlaintextOnly = no)。
#1
If you want to do it all inline use the '|' character
如果你想全部内联使用'|'字符
-body 1st line|second line|third line
#2
You can put the body in a text file and have blat send that:
你可以将正文放在一个文本文件中并让blat发送:
blat [text file here] -to mike.roosa@toltsg.com -subject "[DEV] PO Detail Report" -attach "C:\TXT\PODetail_26879.csv" -log
C:\EMAIL.LOG\20090129.TXT -timestamp'
#3
Just use Mail Alert Simple Mailer: https://sourceforge.net/projects/mail-alert/
只需使用Mail Alert Simple Mailer:https://sourceforge.net/projects/mail-alert/
MailAlert.exe -r address@example.com -b "@Your_Directory\File_with_Mail_Body.txt"
MailAlert.exe -r address@example.com -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).
您还可以将HTML文件作为电子邮件正文附加(请记住在这种情况下更改PlaintextOnly = no)。