gfcaim 0 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] Share this post Link to post Share on other sites
Juvigy 49 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 Share this post Link to post Share on other sites
Jos 2,211 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. Share this post Link to post Share on other sites
gfcaim 0 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] Share this post Link to post Share on other sites