As not to scare away people with the amount of writing I like to do, this is simply a replacement to the email class + a few extras. Its currently a work in process, although everything I have thrown at it has completed correctly.
Current Features:
- Sending using Mail, Sendmail, and SMTP [New]
- Multiple recipients (Direct, Carbon Copy, Blind Carbon Copy)
- HTML or Plaintext email
- Attachments (From file or dynamic)
- Word wrapping
- Priorities
- BCC Batch Mode [New]
- Debugging Tools (A little more comprehensive than the default Email class)
- Automatic multipart creation (Detects how many parts, then makes a multipart if needed)
- Method chaining
- Set plain text with $this->dmail->text(’...’) and html with $this->dmail->html(’...’)
- Easy adding/editing of headers to be sent (Ex: $this->dmail->setHeader(‘Content-Type’, ‘text/html’);)
- Load mimes from application/config/mimes.php
- Uses the new driver design
Any info related to bugs, your mileage, and anything else is welcome ![]()
Installing:
- Extract the .zip file
- Place folder in application/libraries
- Load dmail and use it!
Documentation:
All of the functionality of the original has been ported over. Please refer to the Email Class documentation for usage. The new additions are:
/**
* Dynamically attaches a file to the email.
* @param String $contents The contents of the attachment
* @param String $filename The filename to use in the email
* @param String $disposition Defaults to attachment, can also be inline?
* @return Dmail
*/
public function dynamic_attach($contents, $filename, $disposition = 'attachment')
/**
* Sets the HTML content to place into the email.
* @param String $html The emails HTML
* @return Dmail
*/
public function html($html)
/**
* Sets the Plain Text content to place into the email.
* @param String $html The emails Plain Text
* @return Dmail
*/
public function text($text)
Any questions just ask!
Well, that’s about it… Hope someone other than me would find this useful ![]()
