Vibhav MS
Vibhav MS

Reputation: 33

Issues with newline while using blat

I have to send a mail via BLAT. We are shifting from Postie to BLAT. The send mail refuses to send the mail via a batch file.

My code goes as follows

REM ########### Initialize BLAT SMTP Server and User Name #######################
ECHO.
%V_EMAIL_PATH%\blat.exe -install %V_HOST% "[email protected]"
ECHO.

REM ------------------------ Send Email Notifications ---------------
@ECHO ON
set V_EMAIL_ID="[email protected]"
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 "[email protected]" -subject "Test Mail"

The error being thrown is as follows

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

Blat saw and processed these options, and was confused by the last one...

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

Do not understand argument: Hello|test mail to prevent failure during delivery while sending automated mails|Thanks|mno

I tried using breakline as well but even that is failing.

reekar V

Upvotes: 0

Views: 3715

Answers (1)

Endoro
Endoro

Reputation: 37569

try this:

@echo OFF &SETLOCAL
set "[email protected]"
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 "[email protected]" -subject "Test Mail"

Upvotes: 3

Related Questions