예제 #1
0
파일: email_fax.php 프로젝트: pari/rand0m
#!/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();
예제 #2
0
파일: rawemail.php 프로젝트: pari/rand0m
#!/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();
예제 #3
0
파일: actions.php 프로젝트: pari/rand0m
         $responseEmail .= "\n\n";
     } else {
         $responseEmail = $taskDetails["work_briefDesc"];
     }
     $tmp_manageUsers = new manageUsers();
     $user_fromEMailId = $tmp_manageUsers->get_userSingleDetail($USERNAME, 'user_primaryEmail');
     $email = new sendaMail();
     $email->asFrom($user_fromEMailId);
     $email->messageTo($toemailId);
     $email->subject("Details of task - " . $workid);
     $email->body($responseEmail);
     if ($includeAttachments == 'yes') {
         $COMMENTLOGMESSAGE .= "\n Included Attachments";
         $attachments = mysql_query("select diskfilename, uploadname from attachments where workid='{$workid}' ");
         while ($row = mysql_fetch_assoc($attachments)) {
             $email->AddAttachment(APP_INSTALLPATH . 'attachments/' . $_SESSION["subdomain"] . '/' . $row['diskfilename'], $row['uploadname']);
         }
     }
     $email->send();
     $manageWorks->addComment($workid, APPNAME, $COMMENTLOGMESSAGE);
     send_Action_Response('Success', "Details emailed !");
     exit;
     break;
 case 'AddComment':
     $comment = htmlentities($_POST['newComment']);
     $workid = get_POST_var('workid');
     $notifyAssigned = get_POST_var('notifyAssigned');
     if (!checkPermissions_canUserViewTask($USERNAME, $workid)) {
         send_Action_Response('Fail', 'insufficient privilege !');
         return;
     }