| @@ 27-40 (lines=14) @@ | ||
| 24 | * Send a plain-text email. |
|
| 25 | * TestMailer will merely record that the email was asked to be sent, without sending anything. |
|
| 26 | */ |
|
| 27 | public function sendPlain($to, $from, $subject, $plainContent, $attachedFiles = false, $customHeaders = false) |
|
| 28 | { |
|
| 29 | $this->saveEmail(array( |
|
| 30 | 'Type' => 'plain', |
|
| 31 | 'To' => $to, |
|
| 32 | 'From' => $from, |
|
| 33 | 'Subject' => $subject, |
|
| 34 | 'Content' => $plainContent, |
|
| 35 | 'PlainContent' => $plainContent, |
|
| 36 | 'AttachedFiles' => $attachedFiles, |
|
| 37 | 'CustomHeaders' => $customHeaders, |
|
| 38 | )); |
|
| 39 | ||
| 40 | return true; |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| @@ 47-62 (lines=16) @@ | ||
| 44 | * Send a multi-part HTML email |
|
| 45 | * TestMailer will merely record that the email was asked to be sent, without sending anything. |
|
| 46 | */ |
|
| 47 | public function sendHTML($to, $from, $subject, $htmlContent, $attachedFiles = false, $customHeaders = false, |
|
| 48 | $plainContent = false, $inlineImages = false) |
|
| 49 | { |
|
| 50 | $this->saveEmail(array( |
|
| 51 | 'Type' => 'html', |
|
| 52 | 'To' => $to, |
|
| 53 | 'From' => $from, |
|
| 54 | 'Subject' => $subject, |
|
| 55 | 'Content' => $htmlContent, |
|
| 56 | 'PlainContent' => $plainContent, |
|
| 57 | 'AttachedFiles' => $attachedFiles, |
|
| 58 | 'CustomHeaders' => $customHeaders, |
|
| 59 | )); |
|
| 60 | ||
| 61 | return true; |
|
| 62 | } |
|
| 63 | ||
| 64 | /** |
|
| 65 | * Clear the log of emails sent |
|