Skip to content

Commit

Permalink
Better filename
Browse files Browse the repository at this point in the history
  • Loading branch information
montali committed Sep 17, 2019
1 parent 88e87bf commit d976e2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion postino.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function wp_mail($to, $subject, $message, $headers = '', $attachments = array(),
$string_attachments = explode(",", str_replace("\r\n", "\n", $string_attachments));
}
foreach ($string_attachments as $attachment) {
$mail->AddStringAttachment(file_get_contents($attachment), end(parse_url($attachment)));
$mail->AddStringAttachment(file_get_contents($attachment), basename(parse_url($attachment)['path']));
}
}
$address_headers = compact('to', 'cc', 'bcc', 'reply_to');
Expand Down

0 comments on commit d976e2f

Please sign in to comment.