$rc = SetOption("NoMacrosInStrings","On")
$rc = SetOption("NoVarsInStrings","On")
; outlook variables
$Root = CreateObject("Outlook.Application")
$Session = $Root.GetNamespace("MAPI")
$DefaultProfile = Outlook
$Session.Logon($DefaultProfile)
$Folder = $Session.GetDefaultFolder(olFolderInbox)
$Folder.Display
; launch outlook and add email information
$MailItem = $Root.CreateItem(0)
? "Root Creation: "+@Error
$MailItem.Importance = 1
$MailItem.Subject = "Daily Report -- DO NOT REPLY!!!!"
$MailItem.Sender = "sender@someplace.org"
$MailItem.To = "receiver@someplace.org"
$MailItem.Body = "Daily Report Attached!!!"
$Attachments = "C:\Cognos\Data\reportbyday.pdf"
$MailItem.Send
$Root = 0