Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions docs/development/legacy/libraries/email.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ The Email class will automatically create all email headers and will process the
ee()->load->library('email');
ee()->load->helper('text');

ee()->email->wordwrap = true;
ee()->email->mailtype = 'text';
ee()->email->set_wordwrap(TRUE);
ee()->email->set_mailtype('html');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nep! It looks like the old lines work fine with the library but I like your changes to using the library methods instead, sometimes they provide a little extra logic in setting these attributes 👍


ee()->email->from($from);
ee()->email->to($recipient);
ee()->email->subject($email_subject);
Expand Down Expand Up @@ -212,7 +213,7 @@ Returns a string containing any server messages, the email headers, and the emai
| \$clear_attachments | `Boolean` | If set to `TRUE` attachments will be cleared out, otherwise they're left alone. |
| Returns | `Object` | Email class object |

Clears out all parameters set either by property or method:
Clears out all the message-specific parameters set either by property or method (text, recipient, subject, etc.), but not including the overall parameters like the charset, wordwrap, mailtype, and the sending method (smtp, etc.):

ee()->email->clear();

Expand All @@ -223,8 +224,8 @@ If you are sending multiple emails in a method either for notifications or becau
ee()->load->library('email');
ee()->load->helper('text');

ee()->email->wordwrap = true;
ee()->email->mailtype = 'text';
ee()->email->set_wordwrap(TRUE);
ee()->email->set_mailtype('html');
$errors = array();

foreach($member_emails as $username => $from)
Expand Down