![]() |
| |||||||
Automation Anywhere Post messages and questions related to Automation Software here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
|
Hi All, I had asked the experts on this issue, but in fact, figured it out before they had a chance to reply. I use Exchange and Outlook 2007 at my office. When attempting to use the feature for the System Variables, $MAIL-To$ and $MAIL-From$ I was getting a bad email address message and I didn't understand why. What I found is AA doesn't like the standard Outlook format for email names. (e.g. Hodges, Randall <randall.hodges@bms.com> ) Solution: Use the String Manipulation function and before-after available in AA. I found this actually to be the opposite of the way I think of how it should be, but the solution to pulling out the real email address is below. I then placed that new email address into a UserVariable I created for my task. Then, in the SendEmail function, user the new UserVariable (Although I could have over written the system one) to send the reply to the original requestor. My use was to Execute AA when a specific email arrives with specific text in the subject line which included a username. That username is then used to look up in a database that user's profile and return the results to the email sender. 1 Start Loop "Each unread message on server: webmail, User Name: username, Server Type: IMAP, Message Format: HTML 2 ...If $Email Subject$ Includes "Lookup User:" Then 3 .......Variable Operation : $Email Subject$ To $Prompt-Assignment$ 4 .......String Operation: Before-After "$Prompt-Assignment$"; Before: "Lookup User: " and assign output to $Prompt-Assignment$ 5 .......Variable Operation : $Email From$ To $Sender$ 6 .......String Operation: Before-After "$Sender$"; Before: "<" and assign output to $Sender$ 7 .......String Operation: Before-After "$Sender$"; After: ">" and assign output to $Sender$ 8 ...End If 9 End Loop 10 .. Actions in my script.. 217 Send Email: Subject: "Onyx User Profile for: $UserName$ ($Prompt-Assignment$)" Last edited by Randall.Hodges@bms.com; 11-06-2011 at 09:05 AM. |
![]() |
| Thread Tools | |
| Display Modes | |
| |