Differential D9375 Diff 24738 src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerLiteAdapter.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerLiteAdapter.php
| Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | public function addHeader($header_name, $header_value) { | ||||
| } else { | } else { | ||||
| $this->mailer->AddCustomHeader($header_name.': '.$header_value); | $this->mailer->AddCustomHeader($header_name.': '.$header_value); | ||||
| } | } | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setBody($body) { | public function setBody($body) { | ||||
| $this->mailer->Body = $body; | $this->mailer->Body = $body; | ||||
| $this->mailer->IsHTML(false); | |||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setSubject($subject) { | |||||
| $this->mailer->Subject = $subject; | /** | ||||
epriestley: Prefer Javadoc comments, with `/**` on its own line.
/**
* blah blah
*/ | |||||
| * Note: phpmailer-lite does NOT support sending messages with mixed version | |||||
| * (plaintext and html). So for now lets just use HTML if it's available. | |||||
| * @param $html | |||||
| */ | |||||
| public function setHTMLBody($html_body) { | |||||
| $this->mailer->Body = $html_body; | |||||
| $this->mailer->IsHTML(true); | |||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setIsHTML($is_html) { | public function setSubject($subject) { | ||||
| $this->mailer->IsHTML($is_html); | $this->mailer->Subject = $subject; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function hasValidRecipients() { | public function hasValidRecipients() { | ||||
| return true; | return true; | ||||
| } | } | ||||
| public function send() { | public function send() { | ||||
| return $this->mailer->Send(); | return $this->mailer->Send(); | ||||
| } | } | ||||
| } | } | ||||
Prefer Javadoc comments, with /** on its own line.