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 thing. How to make sent with phpmailer script mails go to "Sent" IMAP folder?
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");
}