How to send email to user after a certain period?

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

holy24
New php-forum User
New php-forum User
Posts: 6
Joined: Mon Sep 03, 2012 7:28 pm

How to send email to user after a certain period?

Postby holy24 » Fri Nov 30, 2012 12:07 am

Hi,

I have a problem creating email function that will send to user after a certain period (eg.1month)

Scenario:

I have 2 columns (date and email address) for the users to key in.

Once user entered the fields and click save, an email will be sent to the users. I am able to do this.

However, I need the user to receive another email notification after 1 month from the date field that the user entered. Can anyone please help?

Thanks.

User avatar
webinfopedia
New php-forum User
New php-forum User
Posts: 84
Joined: Sat May 21, 2011 10:26 pm
Contact:

Re: How to send email to user after a certain period?

Postby webinfopedia » Fri Dec 14, 2012 3:34 am

Hi,

Ya you can do that by using Cron Job. Create a PHP file which will look the database, to send email for current day, if the record is exists let it to send it. Save and upload this PHP file in web server. Now call this PHP file from Cron Job. Normally you can find Cron Job in your Website Control Panel (Cpanel). Set the cron job to run this PHP script file every day... Thats all :D
If you have doubt let me know. You can find this kind of stuff in http://www.webinfopedia.com/

Thank You
webinfopedia


Return to “PHP coding => General”

Who is online

Users browsing this forum: Bing [Bot], landi and 2 guests