amdp3-metaforums/Application/Foundations/MailBuilder.php
2019-11-19 02:18:37 +07:00

27 lines
559 B
PHP

<?php
namespace Application\Foundations;
class MailBuilder {
public $to = "";
public $subject = "";
public $message = "";
public $headers = "";
public function to($to) {
$this->to = $to;
return $this;
}
public function subject($subject) {
$this->subject = $subject;
return $this;
}
public function body($body) {
$this->message = $body;
return $this;
}
public function from($from) {
$this->headers .= "From: ".$from."\r\n";
return $this;
}
}