@@ 17-30 (lines=14) @@ | ||
14 | ||
15 | class Native implements Driver { |
|
16 | ||
17 | public function send(Envelope $envelope){ |
|
18 | // PHP requires direct handling of To and Subject Headers. |
|
19 | $success = true; |
|
20 | $recipients = $envelope->to(); |
|
21 | $subject = $envelope->subject(); |
|
22 | $envelope->to(false); |
|
23 | $envelope->subject(false); |
|
24 | foreach ($recipients as $to) { |
|
25 | $current_success = mail($to,$subject,$envelope->body(),$envelope->head()); |
|
26 | \Event::trigger('core.email.send',$to,$envelope,'native'); |
|
27 | $success = $success && $current_success; |
|
28 | } |
|
29 | return $success; |
|
30 | } |
|
31 | ||
32 | } |
|
33 |
@@ 101-114 (lines=14) @@ | ||
98 | return $success; |
|
99 | } |
|
100 | ||
101 | public function send(Envelope $envelope){ |
|
102 | // PHP requires direct handling of To and Subject Headers. |
|
103 | $success = true; |
|
104 | $recipients = $envelope->to(); |
|
105 | $from = $envelope->from(); |
|
106 | $envelope->to(false); |
|
107 | $envelope->from(false); |
|
108 | foreach ($recipients as $to) { |
|
109 | $current_success = $this->SMTPmail($from, $to, $envelope->build()); |
|
110 | \Event::trigger('core.email.send',$to,$envelope,'native'); |
|
111 | $success = $success && $current_success; |
|
112 | } |
|
113 | return $success; |
|
114 | } |
|
115 | ||
116 | } |
|
117 |