homepage Welcome to WebmasterWorld Guest from 54.161.147.106
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Email Piping without an email server?
wsmeyer




msg:3524725
 2:53 am on Dec 11, 2007 (gmt 0)

Sorry if this is a crazy question but I don't really know anything about email servers.

I have a WAMP server for a domain that I am managing that I want to do email piping on but since all email received will be piped to the same php script I am wondering if this can be done simply using Apache.

Can I set up a subdomain in apache sub.domain.com that listens to the incoming mail port and have the script as index.php?

William.

 

gergoe




msg:3525013
 2:26 pm on Dec 11, 2007 (gmt 0)

It is indeed crazy, as you already pointed out ;-)

Receiving email is only possible using an SMTP server (which is communicating with the smtp protocol), and as such, it only can be found in mail servers like postfix or exchange. If you want a server-side script or executable receive emails, you have two options (i can think about in this second).

Implement a pop3 email client in your code, make it connect to the email server periodically, and read the mails from the remote server's mailbox. This requires that your executable or script is periodically called or executed by crontab or scheduled tasks.

Some mail servers support executable accounts (such an account which does not actually have a mailbox, you can not connect to this account by email clients, but each time a mail arrives to this mailbox, a program is executed by the mail server). This is much better for your problem, but if you are using a mail server which does not support such an account (the name of this type of account is certainly different for each mail server), then this option is not for you.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved