I am using SMTP to send email and IMAP to read/write mailbox. When I send email via SMTP it will return whole raw message with header and message (full MIME message). Then using imap_append i am creating copy of that email in Sent box.
If email does not have any attachment then no issue but when have attachment then its not showing email body but when i check Original Message/source/raw message email body text/html exists.
I am using below code for copy email at Sent box
$authhost="{mail.DOMAIN_NAME.com:993/imap/ssl}INBOX.Sent";
if ($mbox=imap_open( $authhost, {USER NAME}, {PASSWORD})) {
$msg = ($str['headers'].$str['message']); // return by SMTP after sending email
imap_append($mbox,$authhost,$msg, "\\Seen");
imap_close($mbox);
return "OKAY";
}