Link to home
Start Free TrialLog in
Avatar of GPSPOW
GPSPOWFlag for United States of America

asked on

Email via SMTP from Batch File

I would like to use a batch file to send an email via a SMTP mail server with attachments.

I have all the settings because I use the SMTP within my SQL server.  The purpose of this  batch file is to take a 'txt' file and forward it to a recipient.  One other wrinkle is that it has to be conditional based on the value within a file, Y or N.

Is this possible?

Thanks

Glen
ASKER CERTIFIED SOLUTION
Avatar of Jon Jaques
Jon Jaques
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GPSPOW

ASKER

Let me try my powershell application.

I'll let you know.

Thanks

Glen
Avatar of GPSPOW

ASKER

Using the attached link and other reference articles I was able to accomplish my task of  setting up a conditional test and then emailing an attachment I created from one of my SQL scripts.

Thanks

Glen
Great, glad that worked for you!

Sometimes I love PowerShell, it can really make tasks easy.

Take care,

Jon
Avatar of GPSPOW

ASKER

Please close question.
See my comments above.
Hello, isn't there a button to accept my answer as a solution?
Avatar of GPSPOW

ASKER

I just check it as helpful.

I do not see any other buttons.

Thanks

Glen
Glad to help!