7 Replies Latest reply on Nov 6, 2011 6:08 AM by plarts

    CFPOP and the FROM variable content

    plarts Level 1
      I use CFPOP with no problem,
      except that when I send from my OutLook,
      the FROM variable content is a name (my name)
      not an Email adress.
      I need the Email adress like : xxxx@xxxx.xx
      which is the unic identifier

       

      I am under CF 7 (or CF 8)
      How to get the Email adress in the  "from" variable of the CFPOP ?

       

      Thanks to any help


      plarts

      Messages: 6
      Inscription: Dim 21 Mar 2010 17:26
        • 1. Re: CFPOP and the FROM variable content
          Adam Cameron. Level 5

          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?

           

          --

          Adam

          • 2. Re: CFPOP and the FROM variable content
            plarts Level 1

            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 xxxx@xxxx.xx)

                 (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.

            Pierre

            • 3. Re: CFPOP and the FROM variable content
              Adam Cameron. Level 5

              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?

               

              --
              Adam

              • 4. Re: CFPOP and the FROM variable content
                plarts Level 1

                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,

                Pierre.

                • 5. Re: CFPOP and the FROM variable content
                  Dan Bracuk Level 5

                  If I understand this correctly, you are receiving a string that looks like:

                  "Your Name" <you@somewhere.com>

                   

                  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.

                  • 6. Re: CFPOP and the FROM variable content
                    plarts Level 1

                    No,

                    either :

                    - "Your Name" when coming from Outlook

                    you@somewhere.com when coming from a Webmail

                     

                    So with "Your Name" , I can't do anything because it not unic.

                     

                    Thanks for ideas,

                    Pierre.

                    • 7. Re: CFPOP and the FROM variable content
                      plarts Level 1

                      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.

                       

                      Pierre.