Jump to content

Recommended Posts

Posted (edited)

Hi,

Can someone please tell me what am I doing wrong here.

I am able to run the Blat Install successfully but email part does not work.

RunWait(@ComSpec & " /c " & "blat -install smtp.SERVER ADDRESS " & @UserName & "@DOMAIN ADDRESS 3 25 - - - -", "", @SW_HIDE)

Local $SMTPADD = "smtp.SERVER ADDRESS"
Local $SUBJECT = "Test"
Local $TO = "TO ADDRESS"
Local $f = "FROM ADDRESS"
Local $body = "This is a Test message"
Local $log = "log.txt"

RunWait("blat.exe -server """ & $SMTPADD & """ -s """ & $SUBJECT & """ -body """ & $body & """ -t """ & $TO & """ -f """ & $f & """ -log """ & $log & """", "", @SW_HIDE)

 

Edited by DigDeep
Posted

well, I even tried with below changes but it still does not sends email.

Run(@WindowsDir & "\blat.exe -to " & $TO & " -subject " & $SUBJECT & " -body " & $body & " -server " & $SMTPADD & " -f " & $f)

Posted

Can you write that string to console just before you try to send it?

Do something like this:

Local $mycommandline = @WindowsDir & "\blat.exe -to " & $TO & " -subject " & $SUBJECT & " -body " & $body & " -server " & $SMTPADD & " -f " & $f
ConsoleWrite($mycommandline & @CRLF)

Just before the Run() command. I would like to see how AutoIt interprets your varaibles.

Skysnake

Why is the snake in the sky?

Posted (edited)

Ah! made such a silly mistake... In the FROM ADDRESS, I gave username.Domain.com instead of username@domain.com.

I corrected this and it is working now.

 

Thanks all.

Edited by DigDeep

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...