Thread Starter
fssbob
(@fssbob)
I’d love to get some attention on this. I believe UpdraftPlus is the most widely used WordPress backup plugin at this point. After each activity it normally sends a status email with an attached text file containing the log entries. It works fine until Postman SMTP takes over wp_mail(). With Postman SMTP active, the text file attachment is stripped from the status email.
UpdraftPlus support gave me this to pass to you in case it helps.
this is how UD is adding the attachments, via a hook to phpmailer_init:
public function phpmailer_init($phpmailer) {
global $updraftplus;
if (empty($this->attachments) || !is_array($this->attachments)) return;
foreach ($this->attachments as $attach) {
$mime_type = (preg_match(‘/\.gz$/’, $attach)) ? ‘application/x-gzip’ : ‘text/plain’;
try {
$phpmailer->AddAttachment($attach, ”, ‘base64’, $mime_type);
} catch (Exception $e) {
$updraftplus->log(“Exception occurred when adding attachment (“.get_class($e).”): “.$e->getMessage());
}
}
}