Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: imap Forwarded

  1. #1
    New Coder
    Join Date
    Jan 2009
    Posts
    34
    Thanks
    1
    Thanked 0 Times in 0 Posts

    imap Forwarded

    I was going to see if there is a way to get the original from address from a Forwarded email address using the IMAP in PHP.

    I am working on a support ticket system. I wanted to have an option setup so if someone(Jack@gmail.com) sends a support ticket to lets say one of our sales team members. The sales member can forward the support email to support@gamil.com and PHP could read the email and get the Jack@gmail.com from the email?

  • #2
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    I believe once forwarded the header will only contain the e-mail addresses relevant to THAT PARTICULAR SENDING (meaning only the sales team's address and the support team's address). That would make imap_headerinfo worthless for that particular message.

    BUT, it seems to me that you could work your way back to the original message using the "references" section of the header, and then pull up that message ID and get the original sender address from the message header there.

    I'm not sure if that would still work if the sales team member had deleted the message though...
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • #3
    New Coder
    Join Date
    Jan 2009
    Posts
    34
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I can run preg_match('/<(.*?)>/s',$message, $forwared_email); to the body of the email, but I was wondering if this would work 100% ?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •