-
Notifications
You must be signed in to change notification settings - Fork 82
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
Parsing emails sent from Outlook 2007 not working #4
Comments
Hi. Thanks for your bug reporting. Have you found out how to fix it? Cheers, On Mon, May 7, 2012 at 4:21 AM, HP8haNU7YxzBkTA <
|
Also emails from Yahoo has the same problem, the yahoo "TO" is like: |
OK, as far as I see this bug, we just need to get out the $email var from the string, this little bug could be fixed so simple: // we've got the $to variable, we just need to apply this to the getTo() //then: now we've got the right email :) |
Your
It should only grab e-mail addresses as opposed to splitting at every space. |
@appastair see the next lines! it's using the "FILTER_VALIDATE_EMAIL" PHP function to validate the string to check if it's valid email address or not... |
I understand those lines but depending on the value of If your input is always going to be something like Though I don't see how the If I've missed something integral; just ignore me hehe but I'm only trying to help and you could compare execution time for each methods to see what works the quickest and most reliably. |
@appastair I just get what you're trying to say, yes, if it's a long string, your solution will definitely speed up the process. Thanks for your help, another thing, could you get "Forwarded-To" from the headers? I mean if you forward the email to another email, a line will be included in the forwarded email header, like: X-Forwarded-To: In the application I'm working on, I need to check if this email which I got is forwarded from another address, or it's sent directly to me, till now, still I'm not able to check if it's a forwarded email or it's sent directly to my address. P.S: by forwarded I mean, imagine we have [email protected], [email protected] and [email protected]. Thanks |
Yeah, that's easy but you'd need to provide an example e-mail. Maybe use some paste service like paste2. Without a sample, this might work but it's getting hackish!
|
@appastair Here you go for the example email with complete headers: It's when an email is sent FROM persian.star[at]ymail.com TO hostpersia[at]gmail.com and the hostpersia[at]gmail.com is forwarding messages to e2s[at]persian-star.ir. the above email is the completed mail with headers which e2s[at]persian-star.ir received. Thanks in advance P.S: if your script for getting "forwarded-to" works, the out put should be "e2s[at]persian-star.ir" |
Give it a whirl in the php-cli package. I added an optional part for third-level registrations for example: nominet.org.uk If you wanted to loop through this for each seaction of the header, it should work by substituting |
Emails sent from Outlook 2007 can not be parsed because email 'to' address is formatted as follows:
< [email protected] > (without spaces)
Instead of the typical:
[email protected]
The text was updated successfully, but these errors were encountered: