Send email w/attachment via batch file

210 pts.
Tags:
Batch files
Batch jobs
Email management
Scheduled Tasks
SMTP Gateway
I would like to be able to set up a scheduled task to call up batch file that would send out an email at a given time of day including an attachment. The question is if anyone would know of a simple way to accomplish this task and what I may need to make it work?

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 9  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Subhendu Sen
    Try using Bla a small tool that sends email, u can use it in scripts. It is Here
    29,710 pointsBadges:
    report
  • Subhendu Sen
    Sorry, I forgot to redirect here for a good Instructions
    29,710 pointsBadges:
    report
  • carlosdl
    An important detail is missing: What operating system ? In case this is on Windows, Bmail could be an option. In this article, they show how to send e-mail attachments using Bmal and mpack: Command Line SMTP Mailer for Batch Jobs
    70,220 pointsBadges:
    report
  • orangehat
    From a windows environment we use bmail and have windows to schedule the task. http://www.beyondlogic.org/solutions/cmdlinemail/cmdlinemail.htm 2 notes on this. Your antivirus (mcafee for example) will prevent you from sending email so you have do disable it or add bmail.exe.. For mcafee under virusscan console, 'access protection properties', 'anti-virus standard protection' you will have a 'block' under 'Prevent mass mailing worms from sending mail'. you need to add bmail.exe to its exclude list. Also, for exchange./hubcas server (you send email to that IP addrtess), under 'server configuration', 'hub transport', on the right will be 'receive connectors'. Change 'Internal Relay'. right click on it, left click on properties, under 'network' , add the IP address of the sending IP address to remove the need to authenticate as bmail (and others) don't so it can just send the mail and not authenticate. It's how we do it. somebody else may have a better idea. Hope this helps.
    1,745 pointsBadges:
    report
  • Subhendu Sen
    I guessed, the OS might be any Windows flavour ! coz the Q asker already mentioned the word "batch file" and not only that, I also guessed the application might be OL :)
    29,710 pointsBadges:
    report
  • carlosdl
    Rechil, you might be right. It is probably Windows, but "batch file" is not a windows-exclusive term at all.
    70,220 pointsBadges:
    report
  • DoneThat
    I used BLAT for years. Sent about 400 "price change" & "marketing" emails per week with PDFs attached. References: http://sourceforge.net/projects/blat/ http://www.blat.net/194/ I ended up developing a fairly sophisticated "set of bat files" (Windows) to do error detection and logging. BLAT always worked. Gary
    830 pointsBadges:
    report
  • Subhendu Sen
    @DoneThat / Gary, I have already mentioned for the SW called "BLAT" ..... with its Link though u used it and expressed ur experience ! Thanks for ur shared opinion. Generally / commonly, batch file refers to Windows OS. Whenever u hear about batch file, at very first, u have to remind for Widows OS.
    29,710 pointsBadges:
    report
  • ConFlicker
    [...] Send email w/ attachment via batch file [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following