Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IMAP.AppendMsg and AMBName
#1
Hello,

  I sent a message with a TidSMTP.

Now I wish save the message in the online server. To do this I try:

Code:
IMAP.AppendMsg(AMBName, MailMessage, []);


But AMBName in my server is 'INBOX.Inviata' but in other server is 'SENT' or 'INBOX.SENT' and so on.

There is a method to pass only one international AMBName valid for all servers?

Thanks
Reply
#2
(11-29-2020, 05:08 PM)luigisic Wrote: But AMBName in my server is 'INBOX.Inviata' but in other server is 'SENT' or 'INBOX.SENT' and so on.

There is a method to pass only one international AMBName valid for all servers?

All IMAP servers are required to recognize ‘INBOX’ (case insensitive) for the primary inbox. Beyond that, everything else is server-specific. You would have to request the actual mailbox list from the server, such as with TIdIMAP4.ListMailBoxes() (which was recently discovered to be slightly buggy).

There is a feature in IMAP to identify certain “special-use” mailboxes, like SENT, but unfortunately TIdIMAP4 does not implement support for that feature at this time. So you will likely have to implement that command manually.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)