Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PlancakeEmailParser.php #13

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Mar 12, 2013

  1. Update PlancakeEmailParser.php

    Added three new functions:
    `getFrom()`, `getFromName()` and `getFromAddress()`
    They can be used to return the sender's display name and e-mail address.
    
    Example:
    `$emailParser = new PlancakeEmailParser($email);
    $emailFrom = $emailParser->getFrom();
    $emailFromName = $emailParser->getFromName();
    $emailFromAddress = $emailParser->getFromAddress();`
    
    `$emailFrom`: `"John Doe" <[email protected]>`
    `$emailFromName`: `John Doe`
    `$emailFromAddress`: `[email protected]`
    tolgamorf committed Mar 12, 2013
    Configuration menu
    Copy the full SHA
    1b94069 View commit details
    Browse the repository at this point in the history
  2. Added more regex to from name/address parsing.

    I found out that some e-mail clients (i.e. iPhone Mail app) does not include quotes in `from` header. The updated code correctly parses the following forms:
    `"John Doe" <[email protected]>
    John Doe <[email protected]>`
    tolgamorf committed Mar 12, 2013
    Configuration menu
    Copy the full SHA
    dcd3a45 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cbf1dc0 View commit details
    Browse the repository at this point in the history