cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert mail address type - Exchange to SMTP

NikhilSaini
Level 3
Hi, I am using MAPIEx to 'Get' emails but sometime I am getting Exchange address in sender email address filed instead of SMTP address. Could someone help me with solution or code on how to convert or get SMTP address if I am getting Exchange address.   Below is Exchange address which I am getting /O=EXCHANGELABS/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=46932ED2875B4644A647DFA0CA3BDF1F-Nikhil Saini   Regards Nikhil
4 REPLIES 4

DavidPfendt
Level 2
Hello guys, I'm having the same issues since updating to MAPIEx Version 2.0.6   Any ideas? Thans

MartinParoubek
Level 2
Hi both, we had also similar program.   We found solution with code stage: https://msdn.microsoft.com/en-us/library/office/ff184624.aspx   BR, Martin

Venkata_Pranav_
Level 6
You got sample code you can post here Martin? 
Pranav

AmiBarrett
Level 12

Go into the code stage for Get Mail. Around ln 43, you should be able to modify the code to look like this.

Sender_Name = msg.SenderName
if msg.SenderEmailType = ""EX"" then
	Sender_Email_Address = msg.Sender.GetExchangeUser.PrimarySmtpAddress
else
	Sender_Email_Address = msg.SenderEmail
end if
Subject = msg.Subject