Does anyone know a good tutorial for a php auto responder. auto responder: a system that automatically sends email
It would not be resource effective to make it in php. You would need to constantly log into a mail server to check for new mail. You could program a mail server in php that would in turn auto respond once a connection from a remote mail server was made and a mail was passed to it. You would need to figure out how to open up a different socket for php to listen to and then interrupt the mail server commands and return the right ones. Here is the RFC for the smtp protocol that you would have to code in php. http://www.faqs.org/rfcs/rfc821.html Honestly your time would be better spent looking at already created mail servers or making one in a different lanague. Most of the articles I found are with a 3rd party mail server interacting with php and not php being the mail server itself. Or on the other hand you might create something very cool and lots of people would say look at that.. just look at what they did with php. Good stuff.
It's easy with php. Just use cron to send out emails at an interval you determine. That's how the third party auto responders work.
I am sorry I read the auto responder and this is what I thought. They need to do an auto mailer program then. Yeah that is totally doable with php. As long as you give it the email to auto email.
You need to write a code that check your e-mail inbox and if it founds a new e-mail it get the sender address and mail it a automatic mail and you can also specify a specific subjects gets specific reply or specific message gets specific reply or two and have a cron job to open that file every 5 minutes or so .
You should create a PHP Script (autoresponder.php) for example. 1. Find a PHP imap reader class in google 2. You should use the PHP IMAP Functions to read the "From" and the Emails ID, i know the imap_headers() function return the Emails ID, i don't know if also return the "From" 3. When you get the "From" email address send the automated email. 4. Save the responded emails ID into a file or database. 5. Configure your Cron Jobs to visit your autoresponder.php file (curl http://yoursite.com/autoresponder.php) every 5 minutes for example. Autoresponder.php will read your email, if autoresponder.php found a new Email ID ( thats mean not in database or text file ). Send the automated email. Excuse my english, i hope you understand me....
Yes CRON JOB Is Best For This Method. Create You Script & Submit The Path Of The SCRIPT In CRON JOB SCRIPT FILE PATH & Set DATE & TIME CRON JOB Will Perform It's JOB On You Submitted Date & Time. You Can Find CRON JOB Icon In Your HOSTING CONTROL PANEL.