Beispiel #1
0
<?php

include 'function_auto_res.php';
$destination = "*****@*****.**";
$message = "This is a test message";
$origin = "From:admin@localhost.com";
$mail = new auto_res($destination, $message, $origin);
echo $mail->notification_mail(100, 25, 'expire');
Beispiel #2
0
$data = get_email($clientID);
echo "<br>" . $data['emailadd'];
$destination = $data['emailadd'];
#the client's email address
$origin = '*****@*****.**';
#admin's email address
$max = $cpimages[$i]->imptotal;
$current = $cpimages[$i]->impmade;
$status = $cpimages[$i]->banner_show;
$message = "To Our Valued Customer, <br><br>";
$message .= "We would like to inform you about the following regarding your advertisments:";
#the message
$message .= "<br>Purchased Impressions: <strong>" . $max . "</strong>";
$message .= "<br>Remaining Impressions: <strong>" . $current . "</strong>";
$message .= "<br>Ad Status            : <strong>" . $status . "</strong>";
$responder = new auto_res($destination, $message, $origin);
if ($responder->notification_mail($max, $current, $status)) {
    $message .= "<br><br><br><br>";
    $message .= "The above message was successfully sent to: ";
    $message .= "Corporate Partner: <strong>" . $data['clientname'] . "</strong>";
    $message .= "<br>Email Address: <strong>" . $data['emailadd'] . "</strong>";
    $message .= "<br>On (Date): <strong>" . date("Y-m-d") . "</strong>";
    save_message($userID_from, 1, date("Ymd"), 'Unread', 'Notification', $message);
    #message to admin
    save_message(1, $clientID, date("Ymd"), 'Unread', 'Notification', $message);
    #message to client
} else {
    $message .= "<br><br><strong>Fail To Send This message. Probably Invalid Email Address.</strong>";
    save_message($userID_from, 1, date("Ymd"), 'Unread', 'Notification', $message);
    #message to admin if fail
}