===== MailAttachment =====
The MailAttachment class handles attachments in MailMessage instances. This class automatically encodes/decodes attachment content before/after sending/receiving messages. It also handles loading/saving attachments from/to files and keeps track of the mimetype of the attachment.
==== Extends ====
==== Implements ====
==== Constants ====
==== Methods ====
==== Code Examples ====
Creating a new attachment from an unencoded variable:
$attachment = new Attachment();
$attachment->body = $content;
Creating a new attachment from an base64 encoded variable as gotten from an email:
$attachment = new Attachment();
$attachment->decodeBody( $encoded_content );
Loading an attachment from file:
$attachment = new Attachment( "/path/to/file.here" );
Saving content of attachment to file using filename from attachment:
$attachment->saveFile();
Saving content of attachment to new filename:
$attachment->saveFile("/path/to/new.file" );