Sent email saved in email sevice all types of email service providers folder

In most cases it's the client that after sending via SMTP, the client opens an IMAP session and appends the send message to the IMAP folder 'Sent'. This is what most email service providers expect from the client. It certainly it is done by desktop clients like Thunderbird and by the official webmail of the email service provider. Third-party clients/senders (i.e. Instantly) would need to do this too.

Code shared by User -

only by using SMTP it wont save the emails

// Append the sent email to the IMAP server's "Sent" folder

// Enable the IMAP extension from your php.ini file

$imapstream = imapopen("{" . $imapserver . ":" . $imapport . "/ssl/novalidate-cert}", $senderemail, $senderpassword);

if ($imap_stream) {

imapappend($imapstream, "{" . $imapserver . ":" . $imapport . "/ssl/novalidate-cert}Sent", $mail->getSentMIMEMessage());

echo 'Email appended to "Sent" folder.';

imapclose($imapstream);

We would need this currently for email providers Dreamhost and Neo.space (Titan.email's retail branch) and I'm confident that other Instantly customers would need this for other email providers as well

Please authenticate to join the conversation.

Upvoters
Status

Open

Board

πŸ’‘ Feature Request

Author

Alex M

Subscribe to post

Get notified by email when there are changes.