How to fetch the user outlook account mail address using uipath?

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.

1 Like

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.

1 Like

You can use IMAP(to read and move mails) or smtp(to send mails) Activity to access user’s outlook account

  1. the Domain name, User name, and Password required

In case of any queries or concerns , let me know

1 Like

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.

1 Like

That’s great

1 Like