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
QD93QD93 

Parsing Email Addresses in Text Body

Hi,

I have an inbound email handler and am hoping to parse the email addresses that enters into Salesforce. I need help to only parse the email addresses from the 'To:' which will be located in the 'Text Body' of the email. What is the best way to only capture these individual emails and add it to a List of Contact emails? Provided below is an example of a email:

---------- Forwarded message ---------
From: John Smith <smith@gmail.com>
Date: Mon, Nov 4, 2019 at 10:19 PM
Subject: Test Email Handler
To: <brown@gmail.com>, <wayne@gmail.com>

This is a test email description.