Search code examples
jakarta-mail

How do I send an email and save a copy to my local Microsoft Outlook “Sent Items” folder using POP3 mail server?


I am using JavaMail API to send emails from my Microsoft Outlook account. The mail server in use is POP3. How can I program JavaMail to save a copy of the sent email in my local “Sent Items” folder?


Solution

  • You can't, unless you can come up with a Store implementation for Outlook, but even then it won't work because Outlook will probably be running and have the PST file locked. See here for Javamail third-party products.

    A much better answer to this sort of thing is to use IMAP and save the email in the IMAP Sent folder. Outlook can see those.