Purchase Mod for $5
Please Login or Register to read the rest of this content.
Email reminder for sponsored and premium listing owners
This is a simple script that can be run by cron and it will send out an email 7 days before the link will expire and a final reminder on the day of expiry.
The emails are fully customizable and can be sent in plain text or HTML.
The config file is quite simple and contains the following
TEMPLATE_0 = firstmail.txt
TEMPLATE_1 = secondmail.txt
SUBJECT_0 = Your account will expire in 7 days
SUBJECT_1 = Your account will expire today
FROM_EMAIL = admin@oursite.com
REPLYTO_EMAIL = subscription@oursite.com
BCC_MAIL = youremail@oursite.com
USER_HTML = FALSE
TEMPLATE_0 = The filename of template 0, which the user receives 7 days before the link expires
TEMPLATE_1 = The filename of template 1, which the user receives on the day the link expires
SUBJECT_0 = The subject of the email for template 0
SUBJECT_1 = The subject of the email for template 1
FROM_EMAIL = A from email address
REPLYTO_EMAIL = A reply to email address
BCC_MAIL = Email yourself a copy of this expiry notice
USER_HTML = TRUE or FALSE
USER_HTML = FALSE will send the mail in ascii (text) format only
USER_HTML = TRUE will send the mail in html format
Other than the config file the only other file that must be edited is mailer.php. You must enter in the path to your application.php file. The way the files are distributed you will not need to change mailer.php if the remindmail folder is placed in the root directory of IndexU.
I suggest you only run this script once a day, as if it is run multiple times then users will receive an email each time.
If you run the file in your browser it will give you a report of which users it has sent email to. If there are no emails to be sent out the results will be blank! This does not mean the file isn’t working, it means there’s nothing to do.
The script accepts a number of variables that you can use in your emails. These must be used exactly as shown and can be used to customize your email. Technically any data in the idx_link table can be displayed for any given link except for category. That was an oversight and if category is used it will only display the category number and not the category name.
{title}
{url}
{date}
{email}
{link_id}
I would also suggest that you provide the link password {password} to users so they may make changes to their link before they choose to renew.