Results 1 to 6 of 6

Thread: Use of Batch File to Send Email

  1. #1
    Join Date
    Nov 2009
    Posts
    678

    Use of Batch File to Send Email

    Hi, I have recently come to know the different useful activities of the batch file. But, I want to know the technique from which I can send any type of email with the help of batch file. If anyone knows this, then please give me the code regarding it. I know that you can achieve this with the help of Outlook Express. But, I don't know how to achieve it with batch file.

  2. #2
    Join Date
    Apr 2008
    Posts
    2,277

    Re: Use of Batch File to Send Email

    I don't think that it is possible to send email with the help of batch file. As there would be need of initiating a SMTP connection in your operating system. And I think that only Professional or Server versions are able to do this. So, If you are using Windows xp operating system then it is not possible to achieve this. So, it is not possible to send email from your Windows xp operating system with the use of batch file.

  3. #3
    Join Date
    Apr 2008
    Posts
    2,276

    Re: Use of Batch File to Send Email

    You need to use the following code in your batch file to send email with the help of it:
    Code:
    set EMAILFILE=%WD_TASKDIR%\..\System.Mail\Out\%WD_CONFIG%_%WD_CUREVT%.TMP
    echo this is the subject > "%EMAILFILE%"
    echo Techon^<t.doe@techarena.com^>;t.does^<t.does@techarena.com^> >> "%EMAILFILE%"
    echo. >> "%EMAILFILE%"
    echo ^<techono@techarena.com^> >> "%EMAILFILE%"
    echo %WD_FILE_SHORTPATH% >> "%EMAILFILE%"
    echo pecunia non olet >> "%EMAILFILE%"
    echo Dear mam , >> "%EMAILFILE%"
    echo Please find attached the file %WD_FILE_N% >> "%EMAILFILE%"
    echo best regards, >> "%EMAILFILE%"
    echo    %COMPUTERNAME% >> "%EMAILFILE%"
    rem okay, the script is created, now rename it so the wdPostMan program processes it.
    ren "%EMAILFILE%" %WD_CONFIG%_%WD_CUREVT%.wdmail

  4. #4
    Join Date
    May 2008
    Posts
    2,792

    Re: Use of Batch File to Send Email

    You can able to create and execute small process with the help of batch files, but it is not possible to send email with the help of batch file. For sending email you need to have the web browser and then you need to fill the values in that and then only you will able to send that mail. But, if you use batch file for it then it would not able to communicate on internet. So, I don't think that you will able to send any email on internet with the use of batch file.

  5. #5
    Join Date
    Apr 2008
    Posts
    2,572

    Re: Use of Batch File to Send Email

    You want to use the batch file for sending email which is not possible. As it is not possible to open Simple Mail Acess Protocol for the use of sending email from your batch file if you use lower versions of the Windows. It may be possible with the Professional version and Server version. But, I don't think that you will able to get any type of batch file sample to do this. As you will require knowledge of ports and protocol to create such type of batch file.

  6. #6
    Join Date
    May 2008
    Posts
    2,134

    Re: Use of Batch File to Send Email

    If you want to send email from batch file then you need to have high quality of knowledge in networking and internet. But, you can make use of following command line e-mail programs to achieve same.
    • Blat
    • GBMailer
    • MailSend
    • GetMail

Similar Threads

  1. Replies: 4
    Last Post: 27-02-2011, 04:32 AM
  2. Windows live mail couldn't send email but can receive email
    By danielyen in forum Windows Software
    Replies: 1
    Last Post: 15-07-2010, 12:17 AM
  3. Macro to convert file into PDF and then send via email
    By MAGALY in forum Software Development
    Replies: 5
    Last Post: 09-12-2009, 05:00 PM
  4. How to send a large video file via email
    By Yudhajit in forum Technology & Internet
    Replies: 3
    Last Post: 23-05-2009, 07:25 PM
  5. Replies: 2
    Last Post: 14-02-2008, 09:16 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,710,829,412.03371 seconds with 16 queries