How can you send mail using IMAP?

后端 未结 5 1892
挽巷
挽巷 2020-12-06 09:03

I am developing a lightweight Gmail client for mobile phones, accessing Gmail by IMAP. I want to send a draft from the Drafts folder, but it has some attachments and I canno

5条回答
  •  臣服心动
    2020-12-06 09:55

    IMAP was designed to receive email messages, not to send it. There is no IMAP command for sending email AFAIK. There is, however, at least one IMAP server which supports a special 'Outbox' folder. When you place the message into this folder it will be sent automatically.

    Check Courier-IMAP documentation on Sending mail via an IMAP connection. Note, that this is a non standard method and I'm not aware of any other server which supports this.

    There RFC 4468 which extends SMTP so it can fetch the mail content from the IMAP server, but I don't know about any working and widely used implementation.

    Talking about gmail: sticking with SMTP is probably the safest way to go.

提交回复
热议问题