@@ 237-242 (lines=6) @@ | ||
234 | { |
|
235 | $log = $this->mailLogger; |
|
236 | $template = $this->getTemplate(); |
|
237 | if (isset($this->config['from'])) { |
|
238 | $from = $this->config['from']; |
|
239 | } else { |
|
240 | $log->err('A from email address must be provided (Variable $from) in Template: ' . $template); |
|
241 | throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: ' . $template); |
|
242 | } |
|
243 | if (isset($this->config['fromName'])) { |
|
244 | $fromName = $this->config['fromName']; |
|
245 | } else { |
|
@@ 243-248 (lines=6) @@ | ||
240 | $log->err('A from email address must be provided (Variable $from) in Template: ' . $template); |
|
241 | throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: ' . $template); |
|
242 | } |
|
243 | if (isset($this->config['fromName'])) { |
|
244 | $fromName = $this->config['fromName']; |
|
245 | } else { |
|
246 | $log->err('A from name must be provided (Variable $fromName) in Template: ' . $template); |
|
247 | throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: ' . $template); |
|
248 | } |
|
249 | if (isset($this->config['subject'])) { |
|
250 | $subject = $this->config['subject']; |
|
251 | } else { |
|
@@ 249-254 (lines=6) @@ | ||
246 | $log->err('A from name must be provided (Variable $fromName) in Template: ' . $template); |
|
247 | throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: ' . $template); |
|
248 | } |
|
249 | if (isset($this->config['subject'])) { |
|
250 | $subject = $this->config['subject']; |
|
251 | } else { |
|
252 | $log->err('A subject must be provided (Variable $subject) in Template: ' . $template); |
|
253 | throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: ' . $template); |
|
254 | } |
|
255 | $this->setFrom($from, $fromName); |
|
256 | $this->setSubject($subject); |
|
257 | return $this; |