Help with Batch Files ASAP...

Soldato
Joined
14 Oct 2007
Posts
2,738
I need help with a batch file asap please...

For my job, I have to send emails to different 3rd party companies and each is different how it is layout out/worded.

Instead of making a template and having to copy paste, I want to make a .bat file so when I run the .bat file, it will open up a new email, have the address already entered, the subject entered and the template entered into the email.

I managed to get a .bat files to open up new emails to certain people with the address already in, but I dont know how to write the script for the subject title and body of message...

Can someone help please?

Thanks
 
Soldato
OP
Joined
14 Oct 2007
Posts
2,738
I have the following:

IF %SUP% == 1 start "" "mailto://******@*********.com?subject=NAME, FAULT, REF&body=

Good Morning/Afternoon.

Can I please log the following call.

NAME
ADDRESS
ADDRESS
ADDRESS
POSTCODE

FAULT

Ref:

Regards

but when I save the .bat file it doesnt come out like the above, I get loads of symbols. How do I put the %0 in to make it appear how it is above...?

Thanks
 
Soldato
OP
Joined
14 Oct 2007
Posts
2,738
How do you mean put it into HTML code? Won't it be easier to have it in the .bat format as above? I just need to know where to place the %0 in the text to make it come out how i want it, like above.
 
Associate
Joined
17 Sep 2008
Posts
1,729
I can't make your script work properly using the mailto command (probably me being thick), but a bit of googling brought up this, which might be easier: SendEmail

I've just tested something along these lines, and it works OK:

Code:
@echo off
sendEmail -f [email][email protected][/email] -t ******@*********.com -s smtp.yourserver.com:587 -xu yoursmtplogin -xp yoursmtppassword -u "NAME, FAULT, REF" -o message-file=bodyofyouremail.txt

Don't forget to use the right binary - one has TLS support, the other doesn't. :)
 
Back
Top Bottom