function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
GWebberGWebber 

Email Services: Parsing an email, Connecting attachments to Opportunities

I am very new to Apex development.  I have the general idea of what I need to do, but do not know how to execute on it.

 

I need to take incoming e-mails and, using an e-mail service, add their attachments to corresponding Opportunities.  These e-mails are all formatted the same, so I have to parse and find the line that starts "Event Code: " and take the six digit code after that to find the appropriate Opportunity instance.


I've found this post from a while back, which has code that does almost exactly what I want.  However, the biggest problem for me is parsing through the document to find that "Event Code: " line.

 

Any help would be greatly appreciated.