Php – Bash Script To Simulate SMTP Mail Receipt

bashPHPsmtp

How would I create a Bash script that simulates SMTP mail receipt and then drops the result into a Maildir-formatted directory (so that Evolution mail reader could read it)?

I just thought it would be a cool thing for PHP developers to have so that they could test SMTP outgoing mail without having to connect to a real mail server or be frustrated with complex Linux mail configs.

Note — I'm not interested in the typical SMTP outgoing mail send CLI stuff that anyone can do with the telnet command. Instead, I'm interested in a Bash script that actually receives the STMP email connection from PHP's mail() command, and processes it into a Maildir-formatted directory.

Best Answer

Wouldn't the easiest answer be to code a simple wrapper around http://quintanasoft.com/dumbster/ ?