Hi Guys,
Can anyone have solution for my scenario, In the send outlook mail activity instead of giving the mail id manually, is there any other chances to fetch the user’s outlook mail address using any of the actions.
Hi Guys,
Can anyone have solution for my scenario, In the send outlook mail activity instead of giving the mail id manually, is there any other chances to fetch the user’s outlook mail address using any of the actions.
I’m not giving any mail account in the properties of send outlook mail activity. The activity is sending mail from the logged in user mail account.
You can use IMAP(to read and move mails) or smtp(to send mails) Activity to access user’s outlook account
In case of any queries or concerns , let me know
Thanks for your reply, but found another way to get current user’s mail id using vba
Private Sub mail_ID()
With CreateObject(“Outlook.Application”).GetNamespace(“MAPI”)
'MsgBox .Session.CurrentUser
'MsgBox .Session.CurrentUser.Address
mymailid = .Session.CurrentUser.AddressEntry.GetExchangeUser.PrimarySmtpAddress
ThisWorkbook.Sheets(“EmailAddress”).Range(“A2”) = mymailid
End With
End Sub
and then integrated to uipath , inside the excel scope application execute the macro and got he current users email address as output.
Thanks for your reply surya, but found another way to get current user’s mail id using vba
Private Sub mail_ID()
With CreateObject(“Outlook.Application”).GetNamespace(“MAPI”)
'MsgBox .Session.CurrentUser
'MsgBox .Session.CurrentUser.Address
mymailid = .Session.CurrentUser.AddressEntry.GetExchangeUser.PrimarySmtpAddress
ThisWorkbook.Sheets(“EmailAddress”).Range(“A2”) = mymailid
End With
End Sub
and then integrated to uipath , inside the excel scope application execute the macro and got he current users email address as output.
That’s great
Without using VBA you can use UiPath. Use a ForEach file in directory.GetFiles("C:\Users" + Environment.username + “\AppData\Local\Microsoft\Outlook”).
For the body use an If file.ToString.Contains(“.ost”) and not file.ToString.Contains(“tmp”) Assign NameVariable = file.ToString.Replace(“C:\Users" + Environment.username + “\AppData\Local\Microsoft\Outlook", “”).replace(”.ost”,“”).
Then just use RegEx to handle the format of the name.
The title of the outlook main window always has the email address in it. By fetching the title name once can easily extract the mail address of the active outlook session.
Following steps were used as part of this approach