Im trying to parse an .emlx file for the from address.
ie.
To: name@domain.com.au
Message-Id: <C327BE72-24CA-410B-B27E-3351B824EFA7@domain.com.au>
Content-Type: multipart/alternative; boundary=Apple-Mail-3-454776749
Cc: name@name.com.au, newname@name.com.au
Subject: Testing new email accounts 12.56pm 12-10-05
From: FirstName LastName <mrname@domain.com.au>
Date: Wed, 12 Oct 2005 12:57:12 +1000
X-Mailer: Apple Mail (2.734)
X-TPG-Antivirus: Passed
so what I want is just the email address "mrname@domain.com.au"
Code: Select all
$myFile = "2477.emlx";
$theString = file_get_contents ($myFile);
preg_match (SOME REGEX THING HERE!, $theString, $match);Any ideas?