public function sendTest()
 {
     $lep = new Leapmail2();
     $hasil = $lep->sendHTMLEmail($_POST['to'], $_POST['subject'], $_POST['text'], $_POST['html']);
     echo json_encode($hasil);
     die;
 }
Ejemplo n.º 2
0
 public function sendEmail($to, $arrReplace)
 {
     $this->setVar($arrReplace);
     $this->addTable();
     $lep = new Leapmail2();
     $hasil = $lep->sendHTMLEmail($to, $this->email_subject, $this->email_template_text, $this->email_template_html);
     $suc = $hasil->success();
     //should we log this ?
     $ml = new EmailLog();
     $ml->log_date = leap_mysqldate();
     $ml->log_email_id = $to;
     $ml->log_status = $suc;
     $ml->log_template = $this->email_id;
     $ml->save();
     return $suc;
 }
Ejemplo n.º 3
0
    function testEmail()
    {
        die;
        $judul = "It's Official: You're On The Appear Team";
        $message = '<html><body>';
        $message .= '
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td align="center">
            <img src="' . _BPATH . 'images/registration.png" alt="Appear Registration" />
            <h1>Thank you for registering with us.</h1>
            <h2>OUR MISSION IS CLEAR: APPEAR IS THE APP FOR YOUR BUSINESS.</h2>
            <p>Here are your registration credentials:</p>
        </td>
    </tr>
    <tr>
        <td>';
        $message .= '<table rules="all" width="100%" style="border-color: #666;" cellpadding="10">';
        $message .= "<tr style='background: #eee;'><td><strong>Username:</strong> </td><td>" . strip_tags("elroy") . "</td></tr>";
        $message .= "<tr><td><strong>Email:</strong> </td><td>" . strip_tags("*****@*****.**") . "</td></tr>";
        $message .= "</table>";
        $message .= '</td>
    </tr>
</table>';
        //        $message .= '<img src="'._BPATH.'images/registration.png" alt="Appear Registration" />';
        //        $message .= '<h1>Thank you for registering with us.</h1>';
        //        $message .= '<h2>OUR MISSION IS CLEAR: APPEAR IS THE APP FOR YOUR BUSINESS.</h2>';
        //        $message .= '<p>Here are your registration credentials:</p>';
        $message .= "</body></html>";
        $isi = $message;
        $isi = "\n                        <h1>Thank you for registering with us!!</h1>\n                        <br>\n\n                        ";
        $lep = new Leapmail2();
        $hasil = $lep->sendHTMLEmail("*****@*****.**", $judul, $isi, $message);
        //        pr($hasil);
        pr($hasil->success());
        $hasil->success() && var_dump($hasil->getData());
    }
Ejemplo n.º 4
0
    function appPaymentMode($email, $uname, $app_name, $mode)
    {
        $judul = "Your Payment for {$app_name} was {$mode}";
        $message = '<html><body>';
        $message .= '
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td align="center">
            <img src="' . _BPATH . 'images/registration.png" alt="Appear Registration" />
            <h1>We are sorry .</h1>
            <h2>We will process your App immediately.</h2>
            <p>Your Android App will be ready in 2 working days.</p>
            <p>If your Order includes an iOS App, the iOS App will be ready in 3 weeks.</p>
        </td>
    </tr>

</table>';
        $message .= "</body></html>";
        $isi = "Thank you for your payment.\nWe will process your App immediately\n        Your Android App will be ready in 2 working days.\n        If your Order includes an iOS App, the iOS App will be ready in 3 weeks.\n";
        $lep = new Leapmail2();
        $hasil = $lep->sendHTMLEmail($email, $judul, $isi, $message);
        return $hasil->success();
        //        $hasil->success() && var_dump($hasil->getData());
        //array(1) { ["Sent"]=> array(1) { [0]=> array(2) { ["Email"]=> string(23) "*****@*****.**" ["MessageID"]=> int(18858860444541457) } } }
    }
    function pulsaPaymentMode($email, $uname, $app_name, $mode)
    {
        $judul = "Your Payment for {$app_name} was {$mode}";
        $message = '<html><body>';
        $message .= '
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td align="center">
            <img src="' . _BPATH . 'images/registration.png" alt="Appear Payment Failed" />
            <h1>We are sorry. ' . $judul . '</h1>

        </td>
    </tr>

</table>';
        $message .= "</body></html>";
        $isi = $judul;
        $lep = new Leapmail2();
        $hasil = $lep->sendHTMLEmail($email, $judul, $isi, $message);
        return $hasil->success();
        //        $hasil->success() && var_dump($hasil->getData());
        //array(1) { ["Sent"]=> array(1) { [0]=> array(2) { ["Email"]=> string(23) "*****@*****.**" ["MessageID"]=> int(18858860444541457) } } }
    }