gfcaim Posted June 16, 2010 Posted June 16, 2010 I've searched the forum but all i've found seems to be regarding smtp such as gmail.I simply wnat to send myself an email when my AutoIt script fails. This is on a company network where Outlook is the default client and is installed on the machine where the script is running, so the email will be internal. Is there a simple way to do this?Apologies in advance if this is me being thick! [font="Comic Sans MS"]"I'm not usually a praying man, but if you are up there, please save me Superman!" (Homer J. Simpson)[/font]
Juvigy Posted June 16, 2010 Posted June 16, 2010 (edited) Local $olMailItem = 0 Local $olFormatRichText = 3 Local $olImportanceLow = 0 Local $olImportanceNormal = 1 Local $olImportanceHigh = 2 Local $olByValue = 1 Local $olFormatHTML = 2 Local $olFormatPlain = 1 $oOApp = ObjCreate("Outlook.Application") $oOMail = $oOApp.CreateItem ($olMailItem) $oOMail.Save With $oOMail .To = ("test@domain.com") .Subject = "subject of mail" .BodyFormat = $olFormatHTML .Importance = $olImportanceNormal .HTMLBody = "Hi There" .Send EndWith $oOApp=0 Edited June 16, 2010 by Juvigy
Developers Jos Posted June 16, 2010 Developers Posted June 16, 2010 or : http://www.autoitscript.com/forum/index.php?showtopic=89321&view=findpost&p=641848 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
gfcaim Posted June 16, 2010 Author Posted June 16, 2010 Thanks very much for the replies, much appreciated. The code form Juvigy sorts me out and the link from Jos I will spend some time in to learn for the future. Thanks again. [font="Comic Sans MS"]"I'm not usually a praying man, but if you are up there, please save me Superman!" (Homer J. Simpson)[/font]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now