Expiration email question

13 years 4 months ago #147290 by ThaiM
Replied by ThaiM on topic Re:Expiration email questi
rodsdesign wrote:

...One person had me set it up for them to email at 60, 30, 15 days before - then 14 days after....

I also have it so you can get an email listing everyone who was notified....


Can you attach that script in a posting please and thanks?

Please Log in to join the conversation.

13 years 4 months ago #147293 by ThePiston
Replied by ThePiston on topic Re:Expiration email questi
yeah, I'm editing it now. From the post though it sounded as if the script sent out the CBxubs expiration email, but I think it only does that after they expire and have not yet renewed. thanks

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X

Please Log in to join the conversation.

13 years 4 months ago #147315 by ThePiston
Replied by ThePiston on topic Re:Expiration email questi
script almost worked perfectly out of the box for me. I changed "include" to "require" and after the this line:
[code:1]$today=date('Y-m-d');[/code:1] I added
[code:1]// Opens a connection to a mySQL server
$connection=mysql_connect ($hostname, $username, $password);
if (!$connection) {
die('Not connected : ' . mysql_error());
}

// Set the active mySQL database
$db_selected = mysql_select_db($database, $connection);
if (!$db_selected) {
die ('Can\'t use db : ' . mysql_error());
}
[/code:1]
I also added this to the query just to be sure no one was getting through: "AND jos_users.block = 0"

worked great. thanks so much

Post edited by: ThePiston, at: 2010/11/30 18:37

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X

Please Log in to join the conversation.

13 years 4 months ago #147319 by ThePiston
Replied by ThePiston on topic Re:Expiration email questi
one more question: how do I find the time on my server? I need to configure the cron so that it sends out my emails early in the morning, but CBsubs has my expiration date and time as "2011-01-01 07:59:59" and that looks like "Dec 31, 12:59:59" inside CBsubs so it's an 8 hour difference.

I need to find the time of my server and get my times perfect since I want one of my emails to be sent out as a "you expire TODAY"

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X

Please Log in to join the conversation.

13 years 4 months ago #147401 by Aly
Replied by Aly on topic Re:Expiration email questi
I would absolutely love to be able to implement a 14 day notification if you've already got that??

Please Log in to join the conversation.

13 years 4 months ago #147446 by rodsdesign
Replied by rodsdesign on topic Re:Expiration email questi
if you create a quick script like this... it will give you your server time.

[code:1]<?php echo date("l j F Y g:h:«»s"«»); ?> [/code:1]

i called it time.php and put in the root... ran it to determine time zone then deleted it.

hth

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.270 seconds