.
*/
include_once 'phing/Task.php';
/**
* Send a message by mail()
*
* The build process is a success...
*
* @author Francois Harvey at SecuriWeb (http://www.securiweb.net)
* @version $Id: MailTask.php 905 2010-10-05 16:28:03Z mrook $
* @package phing.tasks.ext
*/
class MailTask extends Task {
protected $recipient;
protected $subject;
protected $msg;
function main() {
$this->log('Sending mail to ' . $this->recipient );
mail($this->recipient, $this->subject, $this->msg);
}
/** setter for message */
function setMsg($msg) {
$this->setMessage($msg);
}
/** alias setter */
function setMessage($msg) {
$this->msg = (string) $msg;
}
/** setter for subject **/
function setSubject($subject) {
$this->subject = (string) $subject;
}
/** setter for recipient **/
function setRecipient($recipient) {
$this->recipient = (string) $recipient;
}
/** alias for recipient **/
function setTo($recipient) {
$this->recipient = (string) $recipient;
}
/** Supporting the Message syntax. */
function addText($msg)
{
$this->msg = (string) $msg;
}
}