Differential D9375 Diff 24738 src/applications/metamta/adapter/PhabricatorMailImplementationSendGridAdapter.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/adapter/PhabricatorMailImplementationSendGridAdapter.php
| Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | public function addHeader($header_name, $header_value) { | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setBody($body) { | public function setBody($body) { | ||||
| $this->params['body'] = $body; | $this->params['body'] = $body; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setSubject($subject) { | public function setHTMLBody($body) { | ||||
| $this->params['subject'] = $subject; | $this->params['html-body'] = $body; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setIsHTML($is_html) { | |||||
| $this->params['is-html'] = $is_html; | public function setSubject($subject) { | ||||
| $this->params['subject'] = $subject; | |||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function supportsMessageIDHeader() { | public function supportsMessageIDHeader() { | ||||
| return false; | return false; | ||||
| } | } | ||||
| public function send() { | public function send() { | ||||
| Show All 10 Lines | public function send() { | ||||
| $params = array(); | $params = array(); | ||||
| $ii = 0; | $ii = 0; | ||||
| foreach (idx($this->params, 'tos', array()) as $to) { | foreach (idx($this->params, 'tos', array()) as $to) { | ||||
| $params['to['.($ii++).']'] = $to; | $params['to['.($ii++).']'] = $to; | ||||
| } | } | ||||
| $params['subject'] = idx($this->params, 'subject'); | $params['subject'] = idx($this->params, 'subject'); | ||||
| if (idx($this->params, 'is-html')) { | |||||
| $params['html'] = idx($this->params, 'body'); | |||||
| } else { | |||||
| $params['text'] = idx($this->params, 'body'); | $params['text'] = idx($this->params, 'body'); | ||||
| if (idx($this->params, 'html-body')) { | |||||
| $params['html'] = idx($this->params, 'html-body'); | |||||
| } | } | ||||
| $params['from'] = idx($this->params, 'from'); | $params['from'] = idx($this->params, 'from'); | ||||
| if (idx($this->params, 'from-name')) { | if (idx($this->params, 'from-name')) { | ||||
| $params['fromname'] = $this->params['from-name']; | $params['fromname'] = $this->params['from-name']; | ||||
| } | } | ||||
| if (idx($this->params, 'reply-to')) { | if (idx($this->params, 'reply-to')) { | ||||
| ▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines | |||||