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.

Discuss This Question: 11  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.
  • Subhendu Sen
    Try using Bla a small tool that sends email, u can use it in scripts. It is Here
    53,000 pointsBadges:
    report
  • Subhendu Sen
    Sorry, I forgot to redirect here for a good Instructions
    53,000 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
    77,180 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,890 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 :)
    53,000 pointsBadges:
    report
  • carlosdl
    Rechil, you might be right. It is probably Windows, but "batch file" is not a windows-exclusive term at all.
    77,180 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.
    53,000 pointsBadges:
    report
  • Featured Member: Orangehat - ITKE Community Blog
    [...] Send email w/ attachment via batch file [...]
    0 pointsBadges:
    report
  • dreamwc
    @Carlosdl - This person is asking for a BATCH file, which is a Windows system script file. (*.bat) This alone tells us the person is asking about a Windows OS. So, your reply simply tells us that you are NOT the person who needs to be answering this question...
    10 pointsBadges:
    report
  • TheRealRaven
    Could be Windows; but it fits very well with IBM i (i.e., AS/400-series), especially because of the "SMTP gateway" tag. Although it can apply to Windows, use of a "SMTP gateway" is probably far more common there.
    18,995 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.

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

Following

Share this item with your network: