lib/mail/Mail.php
public function addAttachment(
        $attachment,
        $type = null,
        $filename = null,
        $disposition = null,
        $content_id = null
    ) {
        if (is_array($attachment)) {
            $attachment = new Attachment(
                $attachment[0],
                $attachment[1],
                $attachment[2],
                $attachment[3],
                $attachment[4]
            );
        } else if (!($attachment instanceof Attachment)) {
            $attachment = new Attachment(
                $attachment,
                $type,
                $filename,
                $disposition,
                $content_id
            );
        } 
        $this->attachments[] = $attachment;
    }
public function addAttachment(
        $attachment,
        $type = null,
        $filename = null,
        $disposition = null,
        $content_id = null
    ) {
        if (is_array($attachment)) {
            $attachment = new Attachment(
                $attachment[0],
                $attachment[1],
                $attachment[2],
                $attachment[3],
                $attachment[4]
            );
        } else if (!($attachment instanceof Attachment)) {
            $attachment = new Attachment(
                $attachment,
                $type,
                $filename,
                $disposition,
                $content_id
            );
        } 
        $this->attachments[] = $attachment;
    }
public function addAttachment ( $ attachment , $ type = null , $ filename = null , $ disposition = null , $ content_id = null ) { if ( is_array ( $ attachment ) ) { $ attachment = new Attachment ( $ attachment [ 0 ] , $ attachment [ 1 ] , $ attachment [ 2 ] , $ attachment [ 3 ] , $ attachment [ 4 ] ) ; } else if ( ! ( $ attachment instanceof Attachment ) ) { $ attachment = new Attachment ( $ attachment , $ type , $ filename , $ disposition , $ content_id ) ; } $ this -> attachments [ ] = $ attachment ; }
Add an attachment to a Mail object

@param string|Attachment $attachment Attachment object or
Base64 encoded content
@param string|null $type Mime type of the attachment
@param string|null $filename File name of the attachment
@param string|null $disposition How the attachment should be
displayed: inline or attachment
default is attachment
@param string|null $content_id Used when disposition is inline
to diplay the file within the
body of the email
Add an attachment to a Mail object