| Email General questions, webmail, mailing lists. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|
#1 (permalink) |
|
Registered User
Seasoned Poster
Joined in May 2003
Lives in Atlanta, GA
69 posts
Gave thanks: 0
Thanked 1 Time in 1 Post
|
So here's the deal.
I *just* stumbled across this feature/setting in cPanel: Cpanel -> Email Forwarder -> Destination: Pipe to a Program and it COULD be exactly what I have been looking for a long time! Well, so, if I wanted to forward/pipe the emails to a specific PHP script... HOW do I handle the email? i.e., it probably isn't a $_GET or $_POST since it's not HTTP. In what format does the email get piped into the PHP script, and how would I parse it? Also, what about an email that has an attachment? How can that be handled by the PHP script? ANY thoughts/ideas on how this works would be HIGHLY appreciated! Thanks!! -taka
__________________
Server: simplemedia.com XX.XX.74.115 (Reseller) DNS: ns770.dizinc.com ns771.dizinc.com Sites: www.simplemedia.com www.southernbloom.com www.torimoto.net www.rubyforest.net |
|
|
|
|
|
#2 (permalink) |
|
Registered User
Seasoned Poster
Joined in May 2003
Lives in Atlanta, GA
69 posts
Gave thanks: 0
Thanked 1 Time in 1 Post
|
ok so I found out (thanks to Google) that it's just STDIN.
But what is the formatting of the mail? I am currently assuming pure text like POP/SMTP uses...
__________________
Server: simplemedia.com XX.XX.74.115 (Reseller) DNS: ns770.dizinc.com ns771.dizinc.com Sites: www.simplemedia.com www.southernbloom.com www.torimoto.net www.rubyforest.net |
|
|
|
|
|
#3 (permalink) | |
|
Registered User
Seasoned Poster
Joined in May 2003
Lives in Atlanta, GA
69 posts
Gave thanks: 0
Thanked 1 Time in 1 Post
|
i'm just answering my own Q's... :-)
ok so it's just normal internet mail format (ASCII text). I've got it mostly working - only issue I have is that the PHP file DOES parse it, because I have the PHP file itself do a mail() to forward all content from STDIN to myself (which does work)... but I ALSO get an error email from the server: Quote:
__________________
Server: simplemedia.com XX.XX.74.115 (Reseller) DNS: ns770.dizinc.com ns771.dizinc.com Sites: www.simplemedia.com www.southernbloom.com www.torimoto.net www.rubyforest.net Last edited by takabanana; November 15th, 2007 at 7:44 PM.. |
|
|
|
|