• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1455
  • Last Modified:

Send Email using SMTP in Windows .Bat File

Please give me the exact code to send an email using SMTP with an attachment.   The email address is "name.com", SMTP server is, attachment is at "C:\Folder", subject should say "File Attached", Body should say "Here is your file"

This will run as a .bat file run by Windows Task Scheduled under Win Server 2008
1 Solution
QlemoBatchelor and DeveloperCommented:
Get BLAT (http://sourceforge.net/projects/blat/files/Blat%20Full%20Version/) and use this line:
blat -Subject "File Attached" -Body "Here is your file" -To To@Name.Com -Server -attach C:\Folder\file 

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now