+1 vote

I can not send mail via IMAP.

How can i send mail so that sended email will be also in imap folder SENT?
provide me sample code

by

1 Answer

0 votes
 
Best answer

IMAP protocol is not used for sending messages. It is designed for retrieval only.

You should be using SMTP for sending emails.

Some SMTP servers automatically put sent email in to sent folder of the sender. This is not an SMTP protocol requirement and many servers don’t do that.

In such case, you’ll need to manually upload sent email to the sent folder using IMAP:
https://www.limilabs.com/blog/upload-email-to-sent-folder-after-sending

by (297k points)
...