Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 5:02 pm
Auto Dialer Software


All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Expire Notify Alert mail
PostPosted: Thu Oct 22, 2015 12:24 pm 
Offline

Joined: Thu Oct 22, 2015 12:16 pm
Posts: 9
Hi !I am a2billing Beginner user .
I'm looking for a script that mail is sent when a customer of use has expired . :?:

It is only those that you use the mail template , please let us know something hint .
Nice to meet you.


Top
 Profile  
 
 Post subject: Re: Expire Notify Alert mail
PostPosted: Fri Oct 23, 2015 8:33 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

The card is only set to expired and inactive if a call is attempted, there is no cronjob to check expired cards.

To do this, you would have to write some SQL in a script to check whether a card was expired and send an email.

Joe


Top
 Profile  
 
 Post subject: Re: Expire Notify Alert mail
PostPosted: Fri Oct 23, 2015 9:57 am 
Offline

Joined: Thu Oct 22, 2015 12:16 pm
Posts: 9
Joe Thank you .

If there is also something sample script An attempt was made to reference .
Please introduce If there be a simple shell script .


Top
 Profile  
 
 Post subject: Re: Expire Notify Alert mail
PostPosted: Sat Oct 24, 2015 4:11 pm 
Offline

Joined: Tue Jun 20, 2006 3:23 pm
Posts: 153
hi,

you will find autorefill script under cronjobs folder in a2billing. you can EDIT that script to match with your requirements.


Top
 Profile  
 
 Post subject: Re: Expire Notify Alert mail
PostPosted: Sun Oct 25, 2015 2:37 am 
Offline

Joined: Thu Oct 22, 2015 12:16 pm
Posts: 9
Hi Joe

I'm Try ! Thanks


Top
 Profile  
 
 Post subject: Re: Expire Notify Alert mail
PostPosted: Sun Oct 25, 2015 3:03 am 
Offline

Joined: Thu Oct 22, 2015 12:16 pm
Posts: 9
Oh! Sorry


Jroper and Rabon Thanks!!


Top
 Profile  
 
 Post subject: Re: Expire Notify Alert mail
PostPosted: Sat Oct 31, 2015 10:40 am 
Offline

Joined: Thu Oct 22, 2015 12:16 pm
Posts: 9
It is a recent result .
We were set as follows .

/var/spool/cron/root

10 * * * * php /usr/local/src/a2billing/Cronjobs/a2billing_alarm2.php > /dev/null 2>&1

a2billing_alarm2.php

****************************************************************************/
include (dirname(__FILE__) . "/lib/admin.defines.php");
include (dirname(__FILE__) . "/lib/ProcessHandler.php");


// expirationdate >= '".date('Y-m-d H:00:00',strtotime("-1 hour"))." AND expirationdate <= '".date('Y-m-d H:59:59',strtotime("-1 hour"))."
//
// db setting
------

$verbose_level=1;
$QUERY = "SELECT * FROM cc_card WHERE `status` = '5' AND enableexpire = '1' AND expirationdate >= '".date('Y-m-d H:00:00',strtotime("-1 hour"))."' AND expirationdate <= '".date('Y-m-d H:59:59',strtotime("-1 hour"))."'";
//$QUERY = "SELECT * FROM cc_card WHERE id = '2'";
$RESULT = mysql_query($QUERY,$conn) or die(mysql_error());
while($row=mysql_fetch_array($RESULT)){

// SEND REPORT
if ($row) {
$mail_subject = "A2BILLING ALARM : ACCOUNT EXPIRED";

// $mail_content = "ALARM NAME = " . $myalarm[1];
$mail_content="Dear Customer <br>You Account(".$row['username'].")expirationdate(".$row['expirationdate'].")";

try {
// Hostname <myserver-email-address>

$mail = new Mail(null, null, null, $mail_content, $mail_subject);
$mail -> send($row['email']);
// $mail -> send('emailaddress');
} catch (A2bMailException $e) {
if ($verbose_level >= 1)
echo "[Sent mail failed : $e]";
write_log(LOGFILE_CRONT_ALARM, basename(__FILE__) . ' line:' . __LINE__ . "[Sent mail failed : $e]");
}
}
}
if ($verbose_level >= 1)
echo "#### END ALARMS \n";
write_log(LOGFILE_CRONT_ALARM, basename(__FILE__) . ' line:' . __LINE__ . "[#### ALARM END ####]");


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 
Predictive Dialer


All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group