Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Visual Basic 2003 and Later _ Getting From Address From Linked Exchange Email Table

Posted by: muse43 Sep 15 2016, 12:44 PM

I am building an email management solution for a client. I am a beginner Access developer.

I want to be able to automatically unsubscribe people when they reply to the email with the subject "Change Status".

I have an approach that would work except my problem is that the From field in my linked table sometimes shows only the name of the person and not their email. Therefore I have no way of flagging the right contacts (I don't want to rely on the name alone since I'm not sure they will always match the name I have in the database).

I'm not too familiar with Exchange emails but understand that the name resolves to an address somehow. I need access to this I think... is that possible? that i can "resolve" the email address myself (using queries perhaps)?

Or any other ideas on how I can accomplish this???

Thanks so much for your help!

Posted by: DanielPineault Sep 15 2016, 01:22 PM

This can be very difficult. Sadly, Outlook/Exchange do not seem to have very standard ways of handling this. Sometimes the e-mail FROM is direct and thank you you're off to the races (as they say). Other times, if it is an On behalf of, it is impossible to get the e-mail. I have long looked into how to access the e-mails header information through automation, because you can find everything you need there, but I have never found a way. MS has made certain aspects of working with Outlook nightmarish! Extracting e-mail addresses is one of these cases.

Fingers crossed that someone else here can help you.

Posted by: muse43 Sep 16 2016, 12:08 PM

Indeed that is sad... I figured this part of the system I'm developing would be the more straightforward part as I'm familiar with linking to Outlook tables... it's just amazing that you can link to an inbox and not be able to get the most basic piece of info from it... i.e. the sender's info... wow...

Well at least I don't feel bad that I was not able to find any solutions online either...

Does anyone have any workarounds to this??? Otherwise, I'll have to go back to the client and let them know that this is simply not doable... :-(