使用blat时换行问题

时间:2013-07-16 11:44:02

标签: windows email batch-file cmd blat

我必须通过BLAT发送邮件。我们正在从Postie转向BLAT。发送邮件拒绝通过批处理文件发送邮件。

我的代码如下

REM ########### Initialize BLAT SMTP Server and User Name #######################
ECHO.
%V_EMAIL_PATH%\blat.exe -install %V_HOST% "mno@xyz.com"
ECHO.

REM ------------------------ Send Email Notifications ---------------
@ECHO ON
set V_EMAIL_ID="abcd@xyz.com"
set V_SUBJ="Test mail to a group"
set V_MSG="Hello|test mail to prevent failure during delivery while sending automated mails|Thanks|mno"


GOTO Sendemail

:Sendemail


%V_EMAIL_PATH%\blat.exe -body %V_MSG% -to "%V_EMAIL_ID%" -from "mno@xyz.com" -subject "Test Mail"

抛出的错误如下

D:\pmserver\pm-work\Utilities\blat.exe -body "Hello test mail to prevent failure during delivery while sending automated mails. Thanks RM Primary" -to "abcd@xyz.com" -from "mno@xyz.com" -subject "Test Mail"
Blat v2.2.2 (build : Feb 26 2004 10:37:13)

Blat看到并处理了这些选项,并被最后一个混淆了......

Hello|test mail to prevent failure during delivery while sending automated mails.|Thanks|mno

不理解论点:Hello|test mail to prevent failure during delivery while sending automated mails|Thanks|mno

我也试过使用breakline,但即使这样也失败了。

reekar V

1 个答案:

答案 0 :(得分:3)

试试这个:

@echo OFF &SETLOCAL
set "V_EMAIL_ID=abcd@xyz.com"
set "V_SUBJ=Test mail to a group"
set "V_MSG=Hello|test mail to prevent failure during delivery while sending automated mails|Thanks|mno"

%V_EMAIL_PATH%\blat -body "%V_MSG%" -to "%V_EMAIL_ID%" -from "mno@xyz.com" -subject "Test Mail"