Example #1
0
function email_before_shutdown()
{
    $email = new sendaMail();
    $email->messageTo(SUPERADMIN_EMAIL);
    $email->subject('DE DAEMON HAS TERMINATED');
    $email->body("DE DAEMON HAS TERMINATED ");
    $email->send();
}
Example #2
0
function alertAppAdmin($msg)
{
    if ($_SESSION["subdomain"] == TESTSUBDOMAIN) {
        return;
    }
    if (ALERTAPPADMIN) {
        $email = new sendaMail();
        $email->messageTo(SUPERADMIN_EMAIL);
        $email->subject('New Alert: ' . $msg . "  " . $_SERVER["HTTP_HOST"]);
        $email->body(" ");
        $email->send();
    }
}
Example #3
0
#!/usr/bin/php -q
<?php 
require_once "/var/lib/asterisk/agi-bin/phpagi.php";
require_once "/var/lib/asterisk/agi-bin/chandu_custom.php";
// email this_faxfilename
$email = new sendaMail();
$email->messageTo("*****@*****.**");
$email->subject("New Fax from FAX_FROM");
$email->body("You have received a new fax from : AX_FROM ");
$email->AddAttachment('/recvd_faxes/fax_20091213_1608.pdf');
//: Optional
$email->send();
Example #4
0
function sendLoginDetailsToSadmin($subdomain)
{
    $SDB = executesql_returnArray("select dbname as SDB from " . MASTERDB . ".subdomains where subdomain='{$subdomain}' ");
    if (!$SDB) {
        return false;
    }
    $pkgdetails = executesql_returnArray("select " . MASTERDB . ".packages.pkgName, " . MASTERDB . ".packages.pkgNumberOfUsers , " . MASTERDB . ".packages.pkgSpaceMb from " . MASTERDB . ".packages , " . MASTERDB . ".subdomains where  " . MASTERDB . ".packages.pkgId = " . MASTERDB . ".subdomains.package and " . MASTERDB . ".subdomains.subdomain='{$subdomain}' ");
    $pkgName = $pkgdetails[0];
    $pkgNumberOfUsers = $pkgdetails[1];
    $pkgSpaceMb = $pkgdetails[2];
    $to = executesql_returnArray("select variablevalue as sadminemail from " . $SDB . ".sadmin where variable='sadminemail' ");
    $sadminPass = executesql_returnArray(" select variablevalue as sadminpass from " . $SDB . ".sadmin where variable='sadminpass' ");
    $subject = 'Admin Login Details for ' . APPNAME;
    $appname = APPNAME;
    $maindomain = MAINDOMAIN;
    $USERLOGINURL = "http://" . $subdomain . "." . MAINDOMAIN;
    $supportemail = SUPPORT_EMAIL;
    $EMAILMESSAGE = <<<AKAM

\tWelcome to your {$appname} "{$pkgName}" account,
\tYou can created upto {$pkgNumberOfUsers} users, and can use a total of {$pkgSpaceMb} Mb for attachments.

\tBelow are your Admin login details for your account.

\tLogin URL - {$USERLOGINURL}
\tAdmin username : sadmin
\tAdmin Password : {$sadminPass}

\tAs an Admin you will create Users, create works and assign works to various users.
\tUsers will also login via above mentioned URL with the username and password created by Admin.

\tPlease send suggestions, feature requests bug reports etc to {$supportemail}

\tregards,
\t{$appname} Team

AKAM;
    $email = new sendaMail();
    $email->messageTo($to);
    $email->subject($subject);
    $email->body($EMAILMESSAGE);
    $email->send();
    return true;
}
Example #5
0
while ($row = @mysql_fetch_array($report)) {
    if ($row['task_user'] != $currentUser) {
        $REPORTEMAIL[] = "\n---------------------";
        $REPORTEMAIL[] = $row['task_user'] . " :";
        $REPORTEMAIL[] = "---------------------";
    }
    if ($row['task_day'] != $TMP_TODAY) {
        $REPORTEMAIL[] = "{$row['task_day']}, {$row['task_mins']} mins -- {$row['task_desc']}\n";
    } else {
        $REPORTEMAIL[] = "{$row['task_mins']} mins -- {$row['task_desc']}\n";
    }
    $currentUser = $row['task_user'];
}
$updateWasEmailed = mysql_query("update journalentries set wasEmailed='Y' ");
$REPORTEMAIL_BODY = implode("\n", $REPORTEMAIL);
$REPORTEMAIL_SUBJECT = "Daily Report for " . date("F j, Y");
$to = '*****@*****.**';
/*
	$headers = 'From: Daily Journal Report <*****@*****.**>' . "\r\n" .
	'Cc: sanjayj@cigniti.com' . "\r\n" .
	//'Bcc: paripurnachand@gmail.com' . "\r\n" .
    'Reply-To: chandu@cigniti.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
	$mailsent = @mail($to, $REPORTEMAIL_SUBJECT, $REPORTEMAIL_BODY, $headers);
*/
$email = new sendaMail();
$email->messageTo($to);
$email->subject($REPORTEMAIL_SUBJECT);
$email->body($REPORTEMAIL_BODY);
$email->asFrom('*****@*****.**');
$email->send();
Example #6
0
#!/usr/bin/php -q
<?php 
require_once "/var/lib/asterisk/agi-bin/phpagi.php";
require_once "/var/lib/asterisk/agi-bin/chandu_custom.php";
/*
$agi->set_variable("_LoggedIn",$auth);
$agi->verbose("Missing list");
exit(1);
*/
$agi = new AGI();
function agi_get_variable($variable)
{
    global $agi;
    $tmp = $agi->get_variable($variable);
    return $tmp[data];
}
$THISFAXFILENAME = "/recvd_faxes/" . agi_get_variable("THISFAXFILENAME") . ".pdf";
$FAX_FROM = agi_get_variable("CallerIDString");
$email = new sendaMail();
$email->messageTo("*****@*****.**");
$email->subject("You should be reeceiving new fax in a minute");
$email->body("You have received a new fax from : {$FAX_FROM} , FileName: {$THISFAXFILENAME} ");
$email->send();
// email this_faxfilename
$email = new sendaMail();
$email->messageTo("*****@*****.**");
$email->subject("New Fax from {$FAX_FROM}");
$email->body("You have received a new fax from : {$FAX_FROM} ");
$email->AddAttachment($THISFAXFILENAME);
// Optional
$email->send();
Example #7
0
#!/usr/bin/php -q
<?php 
require_once "/var/lib/asterisk/agi-bin/phpagi.php";
require_once "/var/lib/asterisk/agi-bin/chandu_custom.php";
$agi = new AGI();
function agi_get_variable($variable)
{
    global $agi;
    $tmp = $agi->get_variable($variable);
    return $tmp['data'];
}
$UE_CARDNO = agi_get_variable("TaazaUserId");
$UE_PIN = agi_get_variable("TaazaPIN");
$UE_AUTHENTICATED = agi_get_variable("TZ_AUTHENTICATED");
$email = new sendaMail();
$email->messageTo("*****@*****.**");
$email->subject("a User was trying to autenticate");
$email->body("Entered Card No is : {$UE_CARDNO} , entered Pin Number is : {$UE_PIN} ");
$email->send();
if ($UE_AUTHENTICATED) {
    // already authenticated .. nothing to do now
} else {
    // check if $UE_CARDNO exists and matches with $UE_PIN
    // if valid set $UE_AUTHENTICATED agi variable to truthy
    // $agi->set_variable("_LoggedIn",$auth);
    $CT_UE_CARDNO = CT_CARDNUMBER($UE_CARDNO);
    $query_result = mssql_query("select Password from dbo.[xxx Enterprises Limited\$MSR Card Link Setup] where [Card Number]='{$CT_UE_CARDNO}' ;", $db_conn) or die("some error");
    $result = array();
    while ($row = mssql_fetch_array($query_result)) {
        $result[] = $row;
    }
Example #8
0
     send_Action_Response('Success', "Note Added !");
     exit;
     break;
 case 'DeleteNote':
     $nid = get_POST_var('noteId');
     $manageNotes = new manageNotes();
     $manageNotes->deleteNoteWithID($nid);
     send_Action_Response('Success', "Note Deleted !");
     exit;
     break;
 case 'EmailNote':
     $nid = get_POST_var('noteId');
     $emailTo = get_POST_var('emailTo');
     $manageNotes = new manageNotes();
     $note_content = $manageNotes->getNoteWithID($nid);
     $email = new sendaMail();
     $email->messageTo($emailTo);
     $email->subject("Note from Discrete Events");
     $email->body($note_content);
     $email->send();
     send_Action_Response('Success', "Note Emailed !");
     exit;
     break;
 case 'UpdateNote':
     $nid = get_POST_var('noteId');
     $updatedContent = get_POST_var('updatedContent');
     $manageNotes = new manageNotes();
     $manageNotes->updateNote($nid, $updatedContent);
     send_Action_Response('Success', "Note Updated !");
     exit;
     break;