private function sendReturnReceipt() { $mail = new Mailing(); $mail->setMailTo($this->email); $mail->setSubject(PAYPALRECEIPTSUBJECT); $body = PAYPALRECEIPTBODY; $body = str_replace("<time>", $this->transactionTime, $body); $body = str_replace("<id>", $this->transactionID, $body); $body = str_replace("<amount>", $this->amount, $body); $mail->setBody($body); $mail->send(); }
<?php require_once 'handlers/Mailing.php'; /* * TESTING CODEE!! * */ $subject = 'Test mailing'; $body = 'test body'; $address = array('*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**'); $mailing = new Mailing($address); $mailing->subject = 'Test mailing'; $mailing->body = 'test body'; if ($mailing->is_init) { echo 'Sending emails...<br>'; $report = $mailing->send(); echo 'Emails sent!<br>'; echo 'Additional information:<br>'; echo $mailing->getErrorMessage(); var_dump($report); } else { echo $mailing->getErrorMessage() . '<br>'; }