    SMTP :: boolean attachfile ( string filename [, mixed newname [, string mimetype [, string disposition [, string encoding ]]]] )

    Returns TRUE if has been successfully attached, FALSE if not.

    Default values are:
    mixed newname: boolean false
    string mimetype: autodetect
    string disposition: attachment
    string encoding: base64

    Example of mimetype value is: image/gif

    string disposition possible values are: attachment, inline
    string encoding possible values are: 7bit, 8bit, quoted-printable, base64

    Example:

    $mail = new SMTP;

    $mail->AttachFile('/path/filename.zip', 'archive.zip', 'application/zip', 'attachment', 'base64') OR die('error 1');
    $mail->AttachFile('/path/image.gif', false, 'autodetect', 'inline', '8bit') OR die('error 2');
    $mail->AttachFile('/path/test.txt') OR die('error 3');

    [ Comments ]

    Last update: Friday, June 16, 2006