Contributors mailing list archives
contributors@odoo-community.org
Browse archives
Re: [37226] Imap Sent Mails
byHi Michael,
thank you. That is a pretty good summary of the technical options to solve the "sent mail / IMAP" problem. I consider the "Odoo Module" option 3) the best because. Basically that is also what Sergio proposed in his old 8.0 PR just some minutes ago. However, all in all this is just one of the problems using Odoo for E-Mail.
Best and have a nice weekend
Frederik
Hi Frederik,
Indeed, Odoo’s mail sending mechanism does not support IMAP's "Append" command, which is typically used to store outgoing messages in an IMAP folder.Odoo does not store sent emails in an IMAP folder by default because it acts as an SMTP sender, not a full-fledged email client.
Odoo's Sent Emails Exist Only in the technical Mail Queue (Backend):
- Odoo logs sent emails in its internal database (
mail.mail
model).- These emails can be viewed within Odoo under Messaging > Emails or inside records like Sales Orders, Invoices, and Support Tickets.
- However, these emails are not stored in an external IMAP mail folder.
No Configurable IMAP Folder for Sent Emails:
- Traditional email clients (e.g., Thunderbird, Outlook) allow users to specify an IMAP folder where sent emails should be saved.
- Odoo does not provide an option to configure an external IMAP folder for storing sent messages.
WORKAROUNDsSince Odoo does not natively store sent mail in IMAP, we can consider these alternatives:
Use an SMTP Server That Automatically Copies Sent Mail to IMAP ("Sent" Folder)
- Some SMTP providers (e.g., Gmail, Office 365) automatically store a copy of outgoing emails in the "Sent" folder when sending via SMTP.
- If using Postfix, you can configure it to BCC outgoing emails to an IMAP mailbox.
Postfix Example (Adding BCC for Sent Emails):
sudo nano /etc/postfix/main.cf
Add: sender_bcc_maps = hash:/etc/postfix/bcc_mapCreate the BCC mapping file:
sudo nano /etc/postfix/bcc_map
Add: @yourdomain.com archive@yourdomain.comApply changes:
sudo postmap /etc/postfix/bcc_map
sudo systemctl restart postfixUse Odoo's "Aliases" Feature to Auto-Forward Sent Emails to an IMAP Folder
- You can create an email alias in Odoo to automatically forward sent emails to a dedicated IMAP folder.
- This workaround requires configuring mail forwarding on the SMTP server.
Custom Odoo Module to Append Emails to IMAP "Sent" Folder
- A custom Odoo module could be developed to use IMAP's APPEND command to store outgoing messages in a specified folder.
Test the above workarounds and share the knowledge.
Let me know if you, or somebody else, like to receive the workaround for Microsoft Exchange example.
Best regards,
Michel Stroom--Office Everywhere
Business Partner Odoot: +31 6 53360677
e: mstroom@office-everywhere.com
w: Office-Everywhere.comLinkedIn profile: https://linkedin.com/in/stroom
On 6 Feb 2025, at 11:53, Frederik Kramer <notifications@odoo-community.org> wrote:
Dear OCA, talking to a lead about Sales and Distribution, we again (as many times in the past) again came across Odoos somewhat weired way to reinterpret / resuse traditional E-Mail flows (what we all know, use, and are familiar with by using Imap-Servers / Exchange and some form of E-Mail clients (Outlook / Thunderbird). One of the weird things (among many) is that Odoo (apart from the technical sent mail queue) doesn't make us of the features (store sent mail in an IMAP Folder) as it sents Mail through SMTP but not implements the traditional functionality of an E-Mail client to allow storing such mail in an configurable Imap Folder. By searching a solution for that i came across a 3rd party module https://apps.odoo.com/apps/modules/14.0/base_store_sent_emails I thought to myself that we are certainly not the only ones who have this issue. So my question is. Is it really such an exotic feature that nobody in the OCA ever even ideated on such a functionality or is it worthless (i am simply to conservative to change my mind). Or even better does some publicly available concept, module, code exist that i am just not aware of ? Any thoughts, ideas on that Best and thanks for any reply upfront Frederik -- Dr.-Ing. Frederik Kramer Geschäftsführer initOS GmbH Innungsstraße 7 21244 Buchholz i.d.N. Tel: +49 (0) 4181 13503 12 Fax: +49 (0) 4181 13503 10 Mobil: +49 (0) 179 3901819 Email: frederik.kramer@initos.com Internet: www.initos.com Geschäftsführung: Dr.-Ing. Frederik Kramer & Dipl.-Ing. (FH) Torsten Francke Sitz der Gesellschaft: Buchholz i.d.N. Amtsgericht Tostedt, HRB 205226 USt-IdNr.: DE815580155 Steuer-Nr: 15/200/53247_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
-- Dr.-Ing. Frederik Kramer Geschäftsführer initOS GmbH Innungsstraße 7 21244 Buchholz i.d.N. Tel: +49 (0) 4181 13503 12 Fax: +49 (0) 4181 13503 10 Mobil: +49 (0) 179 3901819 Email: frederik.kramer@initos.com Internet: www.initos.com Geschäftsführung: Dr.-Ing. Frederik Kramer & Dipl.-Ing. (FH) Torsten Francke Sitz der Gesellschaft: Buchholz i.d.N. Amtsgericht Tostedt, HRB 205226 USt-IdNr.: DE815580155 Steuer-Nr: 15/200/53247