1

How to parse mime email without using Mailparse PHP extension? Do not offer solutions like MimeMAilParser class (it's using Mailparse) or exploding using "\n\n".

Akim Kelar
  • 635
  • 9
  • 16
  • 1
    you just excluded all the possibily option – dynamic Jun 06 '11 at 12:38
  • Can I ask why you want to exclude this parser? At http://CloudMailin.com we quite often get requests for help decoding emails in PHP so it would be good to know why it potentially shouldn't be used? – Steve Smith Jun 07 '11 at 08:42

3 Answers3

1

Your issues with Mailparse and exploding will go away if you simply remove the closing php tag (? >)

Fox
  • 11
  • 1
0

Try write own parser for example look here https://github.com/breakermind/PhpMimeParser/blob/master/PhpMimeParser_class.php Cut mime message and get parts what you need. It is simple class which parse multipart mime message.

Kazik
  • 19
  • 2
0

Weird exclusions, but alright. Try these (from the Google machine):

Possible dupe of Best way to handle email parsing/decoding in PHP?

ezComponents has a mail parser as demonstrated at http://ezcomponents.org/docs/api/2009.2.1/introduction_Mail.html#parsing-a-message-set

Note that many of these MAY use the Mailparse extension under the hood. What is your specific issue with Mailparse?

Community
  • 1
  • 1
Femi
  • 64,273
  • 8
  • 118
  • 148