?
Solved

Send Email using SMTP in Windows .Bat File

Posted on 2013-05-30
1
Medium Priority
?
1,237 Views
Last Modified: 2013-05-31
Please give me the exact code to send an email using SMTP with an attachment.   The email address is "name.com", SMTP server is 10.15.22.24, 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
0
Comment
Question by:dlpotlatch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 70

Accepted Solution

by:
Qlemo earned 2000 total points
ID: 39210106
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 10.15.22.24 -attach C:\Folder\file 

Open in new window

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
In this modest contribution, I want to share with the IT community (especially system administrators, IT Support Engineers and IT Help Desks) about Windows crashes/hangs and how to deal with these particular problems.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question