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 58091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:47:37+00:00 2026-05-10T17:47:37+00:00

I would like to send mail from a script on a Windows Server 2003

  • 0

I would like to send mail from a script on a Windows Server 2003 Standard Edition. I think the server setup is pretty much out of the box.

The mail server is an Exchange one, and when you’re on the internal network you can use plain old SMTP. I have done it from my machine with Perl, but unfortunately Perl is not available on the server.

Is there an easy way of doing this from a .bat-file or any other way that doesn’t require installing some additional software?

Edit:
Thanks for the quick replies. The ‘blat’ thingie would probably work fine but with wscript I don’t have to use a separate binary.

I didn’t see PhiLho’s post the first time I edited and selected an answer. No need for me to duplicate the code here.

Just save the script to a file, say sendmail.vbs, and then call it from the command prompt like so:
wscript sendmail.vbs

  • 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. 2026-05-10T17:47:37+00:00Added an answer on May 10, 2026 at 5:47 pm

    It is possible with Wscript, using CDO:

    Dim objMail  Set objMail = CreateObject('CDO.Message')  objMail.From = 'Me <Me@Server.com>' objMail.To = 'You <You@AnotherServer.com>' objMail.Subject = 'That's a mail' objMail.Textbody = 'Hello World' objMail.AddAttachment 'C:\someFile.ext'  ---8<----- You don't need this part if you have an active Outlook [Express] account ----- ' Use an SMTP server objMail.Configuration.Fields.Item _     ('http://schemas.microsoft.com/cdo/configuration/sendusing') = 2  ' Name or IP of Remote SMTP Server objMail.Configuration.Fields.Item _     ('http://schemas.microsoft.com/cdo/configuration/smtpserver') = _     'smtp.server.com'  ' Server port (typically 25) objMail.Configuration.Fields.Item _     ('http://schemas.microsoft.com/cdo/configuration/smtpserverport') = 25  objMail.Configuration.Fields.Update ----- End of SMTP usage ----->8---  objMail.Send  Set objMail=Nothing Wscript.Quit 

    Update: found more info there: VBScript To Send Email Using CDO By default it seems it uses Outlook [Express], so it didn’t worked on my computer but you can use a given SMTP server, which worked fine for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 73k
  • Answers 73k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Inspections can be disabled in R#, so yes, this is… May 11, 2026 at 2:06 pm
  • added an answer Right click on Project in Solution Explorer -> Property Pages… May 11, 2026 at 2:05 pm
  • added an answer Finally I solved the issue. I have to activate the… May 11, 2026 at 2:05 pm

Related Questions

I would like to send some keystrokes from a C++ program into another window.
I'm working on a VB6 application and I would like to send a Type
Some of my data are 64-bit integers. I would like to send these to
I would like to quickly send email from the command line. I realize there
When in Outlook 2003, open the Address Book, select Tools->Options. You get the address
It's basically one app that is installed on multiple PC's, each install maintaining it's
How would I generate a proper URL for an MVC application to be included
I have a custom application that was built to send opt-in newsletters and marketing

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.