I'm a bit confused. What's Outlook got to do with this? You'll be making your CFPOP calls to the Exchange server, yes?
Can you expand on what your issue actually is, a bit?
I send (myself, as an example, could be anybody else) a mail to an Email address xxxx,
With CFpop I want to get this mail and identify the sender with the Email adress (in the from variable).
So in the "from" variable of CFpop , I should get the Email adress of the sender.
Then 2 cases :
- If the mail is sent from Outlook , the "from" content have the name of the person (not the Email adress)
(and different person can have the same name)
- If the mail is sent from a Webmail, the "from" content has the Email adress (format email@example.com)
(the email adress is unique)
And I need the Email adress (not the name of the sender) to Identify the person in the DataBase.
Hope, this is clearer ?
Thanks for your help.
Is it a case that this happens with email from Outlook as you say, or because both recipient and sender are within the same email system, so actually an SMTP email address won't necessarily have been used... the message will simply be sent with the internal email address. If - within Outlook - you look at the contact details of a user on the same system, you'll see that there are other email addressing strategies that identify the user's mailbox than simply a standard "internet" email address.
Either way, CFPOP just asks for the info: it's not in control of what info it receives... you'll need to look @ the mail server to have control over that.
If you use some other POP client (like Thunderbird etc), what info do you get back?
You are right,
this has to see with the Mail server.
(and recipient and sender are different Email adresses.)
I need to contact the person in charge of the Mail server and see what can be done
on server parameters , may be.
I will get back when I have the information.
Thanks for your contribution,
If I understand this correctly, you are receiving a string that looks like:
"Your Name" <firstname.lastname@example.org>
and you want to extract the part between the angle brackets? If you google "regular expression email" you will find the pattern you want to match. Then you can use either ReFindNoCase() or ReReplaceNoCase() to get the email address.
I think here is the solution :
The email adress is present in the "from" variable inside brakets < >
So it is not displayed.
With a cfdump, it can be seen.
Make a findnocase of "<" , if found, Email is inside < >.
Then just make a string extraction of the email inside the brakets, if brakets exist.
And the valid Email is there.
But I never seen the small "envelop image" in front of the Email adress.
So I wait other mails from other agents to make sure it works in all cases.