Archived Forum Post

Index of archived forum posts

Question:

Send Email with Read Receipt, and also save to Sent Folder?

Jul 06 '17 at 10:10

When sending email with Chilkat (via the SendEmail method), how can I get the email placed into the "Sent" email folder. Also, how do I send with a Read Receipt?


Accepted Answer

When you use Outlook, Thunderbird, or some other email client, the act of saving the email to the "Sent" folder is something the email client does after sending the email. In other words, it's not something that occurs during the SMTP protocol conversation.

There are two cases:

1) Your "Sent" folder is not a mail folder on the mail server, but is simply a local file managed by the email client (Outlook, Thunderbird, etc.) If this is the case, then there is nothing in Chilkat that can be used to add emails to the Outlook/Thunderbird/etc specific local files/database of emails.

2) Your "Sent" folder is a mail folder located on the mail server. This implies IMAP, because the POP3 protocol is restricted to the Inbox. To append the sent email to the "Sent" folder would mean using the Chilkat IMAP API to select the "Sent" folder and then append the email to the folder using one of the imap.Append* methods, such as AppendMail, AppendMime, AppendMimeWithFlags, etc.


To send email with a Read Receipt:

First, it's important to know that the sender can only request a read receipt / delivery notification. The recipient is free to ignore the request, so one cannot expect with certainty that the receipt will be sent. In fact, it's more than likely it will NOT be sent.

Requesting a read receipt is just a matter of adding the appropriate header field to the email. See this Chilkat blog post on read receipts and delivery notification for details.