Differential D9375 Diff 24738 src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerAdapter.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerAdapter.php
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | if (strtolower($header_name) == 'message-id') { | ||||
$this->mailer->MessageID = $header_value; | $this->mailer->MessageID = $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->IsHTML(false); | |||||
$this->mailer->Body = $body; | $this->mailer->Body = $body; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function setSubject($subject) { | public function setHTMLBody($html_body) { | ||||
$this->mailer->Subject = $subject; | $this->mailer->IsHTML(true); | ||||
$this->mailer->Body = $html_body; | |||||
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(); | ||||
} | } | ||||
} | } |