From 97c1a0e0ec931aa441d9c7e480b28dc36a152c40 Mon Sep 17 00:00:00 2001 From: Marcus Bointon Date: Mon, 13 Nov 2017 09:41:28 +0100 Subject: [PATCH] Clarify params --- src/PHPMailer.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/PHPMailer.php b/src/PHPMailer.php index 44926151..baf93349 100644 --- a/src/PHPMailer.php +++ b/src/PHPMailer.php @@ -3313,15 +3313,16 @@ class PHPMailer /** * Add an embedded stringified attachment. * This can include images, sounds, and just about any other document type. - * Be sure to set the $type to an image type for images: - * JPEG images use 'image/jpeg', GIF uses 'image/gif', PNG uses 'image/png'. + * If your filename doesn't contain an extension, be sure to set the $type to an appropriate MIME type. * * @param string $string The attachment binary data * @param string $cid Content ID of the attachment; Use this to reference * the content when using an embedded image in HTML - * @param string $name - * @param string $encoding File encoding (see $Encoding) - * @param string $type MIME type + * @param string $name A filename for the attachment. If this contains an extension, + * PHPMailer will attempt to set a MIME type for the attachment. + * For example 'file.jpg' would get an 'image/jpeg' MIME type. + * @param string $encoding File encoding (see $Encoding), defaults to 'base64' + * @param string $type MIME type - will be used in preference to any automatically derived type * @param string $disposition Disposition to use * * @return bool True on successfully adding an attachment