Jump to content

Recommended Posts

The web server doesn't receive any email. That would be the MTA (mail transfer agent). Many Linux based MTAs use the /etc/aliases file to specify where the emails should be routed to. By default it's a user on the file system, but it's also possible piping it to STDIN on a script.

 

This line would send email to something@example.com to to the user daniel:

something: daniel

 

This line would send email to something@example.com to a script called parse.php:

something: "| /usr/local/bin/parse.php"

 

In parse.php you can then use the I/O streams to read the email from STDIN. The input format is the usual email format, i.e. first the headers, then a blank line and then the body. That should be trivial enough to parse.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.