Fix for attachments with duplicate filenames, thanks to @revaxarts, fixes #15

This commit is contained in:
Synchro 2012-12-21 11:17:31 +01:00
parent 104869b669
commit 8d85d51975
1 changed files with 1 additions and 1 deletions

View File

@ -2421,7 +2421,7 @@ class PHPMailer {
if ($directory == '.') { if ($directory == '.') {
$directory = ''; $directory = '';
} }
$cid = 'cid:' . md5($filename); $cid = 'cid:' . md5($url);
$ext = pathinfo($filename, PATHINFO_EXTENSION); $ext = pathinfo($filename, PATHINFO_EXTENSION);
$mimeType = self::_mime_types($ext); $mimeType = self::_mime_types($ext);
if ( strlen($basedir) > 1 && substr($basedir, -1) != '/') { $basedir .= '/'; } if ( strlen($basedir) > 1 && substr($basedir, -1) != '/') { $basedir .= '/'; }