amdp3-metaforums/Application/Foundations/MailBuilder.php

27 lines
559 B
PHP
Raw Permalink Normal View History

2019-11-18 13:33:45 +00:00
<?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;
}
}