PHP Parsing Email Message into Variables
<p>I am currently working on building a system for my client that could be classed as a type of ticket system. However, instead of users inputting tickets like a normal system, the tickets are received from a third party (always the same third party) in email format that will be piped in.</p>

<p>What I need to look at (which I've thought using various ways but cant seem to pick out the best) is taking the details from the email and putting them into individual variables.</p>

<p>An example of the email that will be recieved is:</p>

<blockquote>
  <p>Name: Harry Smith<br>
  Status:  Married<br>
  Address: 14 Tyne Road,<br>
  Littlewood<br>
  Manchester<br>
  MC2 3DN<br>
  Telephone: 01551 221502</p>
</blockquote>

<p>Obviously the full email is alot longer, however what I am looking at doing is putting out the details from the email so I can process them as required by the new system. In reality I am looking for something that can store the information in the style of:</p>

<blockquote>
  <p>Name: %name%<br>
  Status:  %status%<br>
  Address: %address%<br>
  Telephone: %telephone%</p>
</blockquote>

<p>I just haven't quite worked out how to code a string search that will find <code>Name:</code> and store every after it up until <code>Status:</code> is reached.</p>

<p>Any help or pointers would be great.</p>

<p>Thanks :)</p>
