3

I know that SwiftMailer is used for sending emails, but I'm trying to parse an email that has come into my PHP script. We already use SwiftMailer in our Symfony site, so I'd like to use it, if it can do what we want.

Scenario:

The email is piped into my PHP script by postfix. I then grab this from StdIn and want to load it into SwiftMailer so I can get easy access to the components - i.e. attachments / headers, to / from etc..

I've searched around on this and tinkered with the SwiftMailer code and can't find any examples or even any indication of direction to look in.

Any help would be gratefully received.

Steve Childs
  • 1,832
  • 2
  • 20
  • 26
  • Do you have ANY indication that Swift Mailer can analyze incoming files like this? It's not clear why you think an email sending component and can analyze incoming files. – ehymel Apr 02 '17 at 15:54
  • Thinking about it, I don't know why I thought it. There seemed to be 'load' type routines in the Mime Message class, but these ultimately didn't do what I thought. Ultimately I used another class from another library to do it (fMailbox if anyone is interested) - http://flourishlib.com/docs/fMailbox – Steve Childs Apr 05 '17 at 09:33
  • 1
    I think you are potentially barking up the wrong tree: perhaps this question will help: https://stackoverflow.com/questions/2510626/how-do-i-verify-a-dkim-signature-in-php – Matthew Slyman Jun 08 '17 at 17:17
  • I wasn't so much as barking up the wrong tree, I was barking up a lamp post, thinking it was a tree ;) Totally bonkers tbh! God knows what I was smoking that day. – Steve Childs Jun 12 '17 at 23:30

0 Answers0