Sent mails with phpmailer don't go to “Sent” IMAP folder

前端 未结 5 744
我寻月下人不归
我寻月下人不归 2020-11-29 11:22

in my CRM online system I control ingoing mails with IMAP protocol. Now I\'m making sending mails with phpmailer and SMTP protocol. Everything is ok but I have one wierd thi

5条回答
  •  Happy的楠姐
    2020-11-29 11:43

    There is now a method getSentMIMEMessage in PHPMailer which returns the whole MIME string

    $mail = new PHPMailer();
    //code to handle phpmailer
    $result = $mail->Send();
    if ($result) {
      $mail_string = $mail->getSentMIMEMessage();
      imap_append($ImapStream, $folder, $mail_string, "\\Seen");
    }
    

提交回复
热议问题