Announcement

Collapse
No announcement yet.

Sending email and attachments in windows batch

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sending email and attachments in windows batch

    Hi,

    Is there any way to send email through batch/dos command line? Purpose is to send an email with attachment(s) directly from the command line as done in unix/linux.

    Also share if there are any effective third party tools available to do this job.

    Thanks,
    Anks

  • #2
    Re: Sending email and attachments in windows batch

    Welcome to the forum, anks
    Will bmail work for you?
    http://www.beyondlogic.org/solutions...mdlinemail.htm
    Read this one as well:
    http://forums.petri.com/showthread.p...ighlight=bmail
    Last edited by venom83; 14th November 2010, 19:06.
    Regards,
    Leonid

    MCSE 2003, MCITP EA, VCP4.

    Comment


    • #3
      Re: Sending email and attachments in windows batch

      Without any 3rd party tools, one cannot really send email. VBScript (built-in) supports mail via CDO and Powershell (built-in in some configurations) supports mail too.

      I've used Blat for mailing in batch scripts. Works pretty well imho.

      -vP

      Comment


      • #4
        Re: Sending email and attachments in windows batch

        ive used both BLAT, and a customised VB Script. You can't do it natively via batch though.


        I don't quite remember the vbs script details, but i'm sure you could find a million examples
        Please do show your appreciation to those who assist you by leaving Rep Point https://www.petri.com/forums/core/im.../icon_beer.gif

        Comment


        • #5
          Re: Sending email and attachments in windows batch

          You may be able to execute VBscript / Powershell components from a batch script. I guess it all depends upon what you are attempting to accomplish. For example: Let's say you have a batch script that dumps out a text log file. You could execute said batch and then a simple VBscript / Powershell script that will grab the output file and email it via SMTP.

          Does this sound like what you are trying to accomplish? Post more details. I may be able to nudge you in the right direction.

          Comment

          Working...
          X