Page 1 of 1

Email using PHP

Posted: Wed Apr 28, 2010 9:39 am
by eskimo87
Hi All,
I have a website hosted at say, abc.com and I have database of registered users with their email id.
Now I want to run a logic and get a subset of the users, and send them an email once a month. Something similar to reminder mail.
As I see, this task is divided in three sub modules-
1. A PHP script with a logic which will get me that subset of users

2. A sendmail($email_id) kind of function which will do the work of sending mail to given address

3. A way to schedule the execution of PHP script (of module#1) and sendmail function, so that email would be sent once in a month automatically


I have module#1 ready but I am stuck with module #2 and #3.
I am new to doing mail stuff using PHP, I want to know
- what all things/settings I should be knowing to do send mail coding in PHP

- I want to send all those reminder emails to users with admin@abc.com as sender , how to achieve that?

- Any pointers to start off with this would be of great help


When I search on how to go about implementing module#3, I found that CRON is preferred way to implement scheduling. But I enquired to my hosting provider and got to know that It is not accessible to me. So please let me know any other alternate ways to implement the scheduling of a PHP script.

Thanks,
Ravi

Re: Email using PHP

Posted: Wed Apr 28, 2010 3:37 pm
by Jonah Bron
For email, take a look at Swift Mailer

http://swiftmailer.org

I've never setup cron, shared or otherwise. You might try searching for "setup cron on shared host".