email parsing automation

Email Parser

Extract data from emails and automate your workflow

The forum is now read only. Please, go to the the main Email Parser website if you need help.
Post here if you experience problems or get unexpected errors.
Hi
Maybe this is a bug, or maybe, my lack of knowledge about email headers.
If an incoming email has both a Display Name and Email address, for example:

"Joe Smith" <joes@frozenfrog.com>

in the CC field, the parser is giving us the display name "Joe Smith" - not the proper email address.

Emails from MS Outlook seem to cause this problem, not surprisingly.

Bug or am I doing something wrong?
Hello Tim,

I have just tested this against an Outlook 2003 PST file and it seems to work. The "From" field is the email address, not the name. So it worked as expected.

Could you send me the email that is causing the problem (or some of them) to test@emailparser2database ?

And if you could send me the PST file attached (only if you can, I know you want to preserve your privacy) it would be the best way to test what could be wrong.
Hi,

Sorry to mislead you. The email source we are using a POP account. When I mentioned Outlook, that was because Outlook was the client that created the email, that was sent to the POP account that we use as our source.

Here's our log file:

[ 5/15/2012 8:06 AM ] INSERT INTO tblInquiry
(fldInquiryReceivedDateTime, fldInquiryFromEmail, fldInquiryToEmail, fldInquiryEmailBCC, fkInquirySchoolID, fldInquiryTopic, fldInquiryComments, fldCC)
VALUES ('5/15/2012 8:06:26 AM','joe@testcompany.com', 'moreinfotest@sometestcomp.com', '', '6','This is a test subject','This is a test body.', '"\'Tim Lastname\'" <timm@testCCaddcompany.com>');

As you can see, the value for CC field is '"\'Tim Lastname\'" <timm@testCCaddcompany.com>'

After the Insert occurs into MySQL, the value that is shown in the record is "Tim Lastname".

But one can see, that both the Friendly name and the proper email address are part of the CC value string. Is there a way that the program can automatically just give the email address part, since that is all we really want?

Thanks, Tim
Hi, I found a solution. Use MySQL Substring function to parse out real email address, since it seems to always be in the <brackets>.

As I mentioned, this seems to be an issue only with the CC email field. So, in the SQL below, it is the last substring command on the CC field that works.

INSERT INTO tblInquiry (fldInquiryReceivedDateTime, fldInquiryFromEmail, fldInquiryToEmail, fldInquiryEmailBCC, fkInquirySchoolID, fldInquiryTopic, fldInquiryComments, fldCC)
VALUES ((STR_TO_DATE('<%DateTimeReceived%>','%c/%e/%Y %r')),(SUBSTRING_INDEX(SUBSTRING_INDEX('<%From%>', '<', -1), '>', 1)),'<%To%>', '<%BCC%>', '6','<%Subject%>','<%Body%>',
(SUBSTRING_INDEX(SUBSTRING_INDEX('<%CC%>', '<', -1), '>', 1)));
Thanks for posting the workaround. I guess the next version will fix this issue.