Jump to content

Witcher

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Witcher

  1. I stop off topic. Thanks anyway Water.
  2. it is to intervene as quickly as possible on an alert. otherwise I have to connect to the mailbox to check regularly if everything is fine. SMS is perhaps an other possibility... I don't know the other reasons of the blocking...
  3. Hi water, Unfortunately the IT administrator will not make an exception for my need even if he understands it. Mails automatically forwarded are blocked. Not the others. A sort of data loss protection? If I put the unread mails in a array and then with a loop, generate a few mails with subject and body, from the array, which I send. Is this possible to do with OutlookEX_UDF? Thanks for your answer...
  4. Hi jos, I try to clarify. I ve used the example script below. It works fine : connect to the mail box, find the mails unread and send them to a external address. I see outlook display the message "sending mail...". But the mail doesn't arrive in the external mailbox. I don't know exactly what blocks ( a admin rule on the exchange server?). I ve tried with a rule in Outlook to forward automatically some mails. This gives the same result. When i forward the mail manualy to the external mailbox, it works. That why, i am interested in Outlookex_udf to simulate a manual sending.. Thanks for your answer... ; Include Functions #include <OutlookEX.au3> Global $oForward, $sRecipient = "John.Doe@company.com" ; Connect to Outlook Global $oOutlook = _OL_Open() If @error <> 0 Then Exit MsgBox(16, "Connect to Outlook", "Error connecting to Outlook. @error = " & @error & ", @extended = " & @extended) ; Access correct mailbox Global $aFolder = _OL_FolderAccess($oOutlook, "\\Correct Mailbox\Inbox", $olFolderInbox) If @error <> 0 Then Exit MsgBox(16, "Folder access", "Error accessing the mailbox. @error = " & @error & ", @extended = " & @extended) ; Get unread items Global $aItems = _OL_ItemFind($oOutlook, $aFolder[1], $olMail, "[UnRead]=True", "", "", "EntryID,Subject,Body") If @error <> 0 Then Exit MsgBox(16, "Item find", "Error searching for unread mail items. @error = " & @error & ", @extended = " & @extended) MsgBox(0, "Number of unread items", $aItems[0][0]) If $aItems[0][0] = 0 Then Exit MsgBox(16, "Error", "No mail items in Correct Mailbox Inbox.") ; Forward all unread mails For $i = 1 To $aItems[0][0] $oForward = _OL_ItemForward($oOutlook, $aItems[$i][0], Default, "") ; Create a copy of the item to forward If @error <> 0 Then Exit MsgBox(16, "Item forward", "Error creating an item copy to forward. @error = " & @error & ", @extended = " & @extended) _OL_ItemRecipientAdd($oOutlook, $oForward, Default, $olTo, $sRecipient) ; Add recipient If @error <> 0 Then Exit MsgBox(16, "Recipient add", "Error adding a recipient to the mail item. @error = " & @error & ", @extended = " & @extended) _OL_ItemSend($oOutlook, $oForward) ; Send the item to the recipient If @error <> 0 Then Exit MsgBox(16, "Item send", "Error sending the mail item. @error = " & @error & ", @extended = " & @extended) Next ; Close connection to Outlook _OL_Close($oOutlook)
  5. Hi, Need help. My society prevents automated e-mail transfer. We are monitoring a pump system and would like to receive alerts when we are not at work on a external box. I tried the _OL_ItemForward example script. No error but obviously the forwarded mails are blocked. What solution can I apply? recreate the email and add the body and send it ? example appreciated . thanks
×
×
  • Create New...