shiznewski Posted January 18, 2010 Share Posted January 18, 2010 I'll try to be as clear as possible. I use cpanel and account level filtering to handle my incoming emails. The filter pipes all incoming email to mypipe.php. Inside the php i break apart the headers and body and add certain information to a database but now i need to forward the email to either myself or my partner. I know there is the mail() function but if i use that the email will come from seann@domain.com instead of the original sender. Is it possible to just redirect(cpanel term in the account level filter options) or fwd the mail as it is? Quote Link to comment Share on other sites More sharing options...
thepip3r Posted January 18, 2010 Share Posted January 18, 2010 i have *not* tested this but try this solution: http://www.cyberciti.biz/faq/howto-change-from-email-address-php-mail-function/ it seems to answer exactly what you're looking to do. Quote Link to comment Share on other sites More sharing options...
shiznewski Posted January 18, 2010 Author Share Posted January 18, 2010 I don't actually want to change the from. I just want to redirect the email to either myself or my partner. If you use forwarding option in hotmail/yahoo/gmail or the redirect to email option in cpanel, this is what i'm trying to accomplish Quote Link to comment Share on other sites More sharing options...
thepip3r Posted January 18, 2010 Share Posted January 18, 2010 right... but this *hack* allows you to specify the FROM value in the PHP mail() function. Isn't that what you're looking to do? ...get a copy of the email as well as though it appears from the original sender? If so, just use this hack and the mail() function to shoot an email to you when you write all of the pertinent values to the database. Quote Link to comment Share on other sites More sharing options...
shiznewski Posted January 18, 2010 Author Share Posted January 18, 2010 I saw an example the other day where the person was piping with popen back to sendmail the whole email with a modified to address. But i can't seem to find it. Quote Link to comment Share on other sites More sharing options...
thepip3r Posted January 18, 2010 Share Posted January 18, 2010 well it sounds like it has become more of a sendmail question then since popen just executes a command on the host OS. if you find it though, i'd be curious to see it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.