|
Answer» I need to send an email from the command line/batch script. I am currently using MSMTP for this. I'd be willing to change BUT the program MUST be able to send using a Gmail account.
I've got MSMTP configured and use the following to send a message: echo Subject: HI | msmtp [emailprotected] or: msmtp [emailprotected] < C:\message where C:\message contains: Subject: Hi
I have TRIED just about EVERYTHING to get a BODY in the message, trying Body:, Text:, and Message:, placing these under or after the Subject: (Subject: works fine by the way)
any ideas?presumably you've read through the documentation for MSMTP? http://msmtp.sourceforge.net/doc/msmtp.html and tried Code: [Select]--help
FByes. MSMTP APPEARS to be designed as a replacement for the program that sends your email normally, i.e., it is designed to be used with annother program, like Mutt. And the documentation contains NO information on using MSMTP, just configuring it! Gack!I'm confused do you still need us?
FBerr, yes, I read the docs before posting. they provide NO information on using the app, only on configuring it. I need to know how to use MSMTP from the command line or a batch script. I can get it to send and email with a subject but not with a body. If there is another command line app that can send though a Gmail account, I'll switch to it if it is better.Then sorry i don't think i can help you, though i'm not sure DOS is the best place to look for support... try over in software.
FBspent a few days on this one. stick a blank line in your file between subject and the message body.
Subject: my subject
body starts here line 2 end of bodyyes, it is very useful to send mails as commandline form. and it works as a blank between the subject and other contents. but there still a problem, i cannot found a way to attach additional files when using msmtp.Quote from: huwenhuo on May 07, 2009, 09:11:29 AM i cannot found a way to attach additional files when using msmtp.
Can be done by encoding with base64
i finally found a better way to send mail at command line
ehco 'mail CONTENT' | mutt -s 'subject' -a additionalFileName [emailprotected]
FWIW, I've used blat for years to send mail from a script. It works great
Development seems to have slowed, but it is very mature
http://www.blat.net/
\\uSlackr
|