Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6839631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:44:31+00:00 2026-05-26T23:44:31+00:00

I need to send an email from a batch script. I tried several solutions

  • 0

I need to send an email from a batch script. I tried several solutions without success.

For example, with Blat:

:send_mail
"\Program Files (x86)\blat275\full\blat.exe" 
    -server smtp.gmail.com
    -port 525
    -f myAdress@gmail.com
    -to recipient@foomail.com 
    -s "hello"
    -body "world"

When I run the script, I just get a Windows crash:

A Win32 command line eMail tool stopped working

Does someone have a better solution?

EDIT & SOLUTION

I tried on our server (with our smtp) and it worked with Blat. See the full code in my answer below.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:44:32+00:00Added an answer on May 26, 2026 at 11:44 pm

    With Blat on my server:

    SET to=myEmail@gmail.com,myOtherEmail@gmail.com
    
    SET server=127.0.0.1
    SET port=25
    SET from=bot@foo.com
    SET subject="BACKUP PROBLEM"
    
    SET year=%DATE:~6,4%
    SET month=%DATE:~3,2%
    SET day=%DATE:~0,2%
    SET today=%year%-%month%-%day%
    
    "\Program Files (x86)\blat275\full\blat.exe" -server %server% -port %port% -f %from% -to %to% -html -s %subject% -body "%today%: bla bla bla"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to send an email from my iPhone app but the name of
I need to send a email from application with text in the from field.
I need to be able to send an email from a silverlight client-side application.
I need a tiny Windows script to send a 1 line email to Gmail
This seems to be pretty straight forward. I need to send email from some
In order to comply with HIPAA regulations, we need to send email from an
We need to send email from our desktop application using C# 3.5 . The
I need to automatically send an email from within an elisp function. Hypothetically, I
I need to send email via my C# app. I come from a VB
I need to send emails from my web application (on account creation, password reset,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.