public function testMailAddressToString() { $addr = new ezcMailAddress("*****@*****.**", "John Doe"); $this->assertEquals("John Doe <*****@*****.**>", $addr->__toString(), "Address not correctly serialized."); }
if ($return_var != 0) { $cli->output("Error executing command: {$cmd}"); $cli->output(var_dump($output)); continue; } unset($output); // Send mail $mail = new ezcMailComposer(); $mail->charset = $charset; $mail->subjectCharset = $charset; $mail->subject = $subject; $mail->htmlText = $html; $mail->plainText = $text; $mail->from = $from_email; $mail->addTo(new ezcMailAddress($delivery->attribute('email'), '', $charset)); $mail->setHeader("Reply-To", $reply_email->__toString(), $charset); $mail->build(); try { $mail_transport->send($mail); } catch (Exception $e) { $cli->output('Error sending mail: ' . $e->getMessage()); } $delivery->setAttribute('state', 'sent'); $delivery->setAttribute('sent', time()); $delivery->store(); // Check time limit $time = time() - $start_time; if ($time > $time_limit) { $cli->output('Time Limit existed. Stopping delivery'); break 2; // Break out of both loops