Tag Archives: Cpanel

Add an email address that forwards to a script

I previously wrote a post aboutĀ receiving e-mail and saving attachments with PHP. I was so focused on having solved that part of my problem that I neglected to write about how to send e-mail to a script in the first place. Thanks to a helpful commenter, today I am rectifying that oversight.

Using CPanel

Here’s how I set up an e-mail address to be sent to a PHP script in CPanel.

First, go to the Forwarders section…

Add an E-mail forwarder

Click the “Add Forwarder” button…

Add a new forwarder

Finally, enter your desired e-mail address and the name of the script you wish to have process your e-mails.

Enter the forwarder data

Not Using CPanel

ThisĀ  article over at Evolt.org looks like it has good instructions on setting up Sendmail, Qmail or Exim to forward to a PHP script. I have not tested those instructions so I don’t know that they work for sure, but the article seems well written so I would give them a try.

Posted in Computers | Tagged , , | 3 Comments