CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Sending reminder emails automatically

Print topic Send  topic

Author Message
gulam

Posts: 55
Posted: 11/13/2011, 3:27 AM

Hi,

I am developing a membership module using CCS 4.3 where I need to send reminder emails to members automatically 30 and 15 days before membership expiry. How do I achieve this sending of reminders automatically without admin intervention?

Any help would be appreciated.

Thanks

Gula,
View profile  Send private message
Gena

Posts: 591
Posted: 11/13/2011, 4:02 AM

create php script and run it via CRON
_________________
Gena
View profile  Send private message
gulam

Posts: 55
Posted: 11/13/2011, 5:05 AM

Hi Gena,

Thanks for your help.

I however required a little more help on how to write that php script itself that would read all membership records and send an email based on date. Would appreciate any sample code that can do this.

Thanks

Gulam
View profile  Send private message
kevstev01

Posts: 1
Posted: 11/16/2011, 4:26 AM

Quote gulam:
I however required a little more help on how to write that php script itself that would read all membership records and send an email based on date. Would appreciate any sample code that can do this.

Hi Gulam - the exact code will depend on your database structure, as you will need to write an SQL statement that selects the appropriate records (e.g. use the DateDiff SQL function to compare the date information), but the way I achieved this on a Windows platform is to create a batch file that uses WGET to retrieve a CodeCharge page that has no controls, and in the "Page BeforeShow" event add the code that connects to your database, performs the record selection query and loops through the record set, and with a SECOND database connection read the information from the user account (i.e. email address, name etc) and use a SMTP email send class (I used PHPMailerLite) to deliver the mail.
As there is no visual output, I recommend adding logging information too, so that you can trace what mail has been sent, to whom and at what time.


_________________
Kevin Stevens
e-Business consultant
www.joinitup.co.uk
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.