[18.0] mail_composer_cc_bcc: re-sending a composer email duplicates the Cc recipient and loses the agreed To / Cc headers
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 66/100
Direzione di ricerca
Start by reading mail_composer_cc_bcc’s MailMail._prepare_outgoing_list() and trace how composer sends set is_from_composer versus how retry and queue sends prepare outgoing messages. Add focused tests covering retry of a failed composer email with To, Cc, and Bcc recipients; done means retry sends exactly three emails and preserves the expected To/Cc headers without duplicating the Cc recipient.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Module: mail_composer_cc_bcc 18.0.1.0.3
Odoo: 18.0 Community, image odoo:18 build 18.0-20260908, clean database, module only
Summary
MailMail._prepare_outgoing_list() returns early unless self.env.context["is_from_composer"] is
set. That key only exists while the composer is sending; the mail.mail outlives it and is
re-sent without it by the standard Retry button of Settings > Technical > Emails
(mark_outgoing() + process_email_queue()), by the queue cron, or by a resend wizard. Those
sends fall back to core, so the two things the module does on purpose are lost:
- the Cc-only email core builds when
mail.email_tois empty is no longer dropped, so the Cc
recipient receives two copies; - every email gets core's per-recipient
Toinstead of the To / Cc pair the composer agreed on.
Steps to reproduce
- Clean 18.0 database, install
mail_composer_cc_bcconly. - Create partners
TO,CC,BCC, all with an email. - Compose a message on any record from the composer with those three in To, Cc and Bcc.
- Make the send fail (stop the SMTP server), so the
mail.mailends inexception. - Settings > Technical > Emails > select it > Retry, then run the email queue.
Observed: 4 emails for 3 recipients:
#1 To='' Cc='"Rcpt CC" <[email protected]>' RCPT TO=['[email protected]']
#2 To='"Rcpt BCC" <[email protected]>' Cc=None RCPT TO=['[email protected]']
#3 To='"Rcpt CC" <[email protected]>' Cc=None RCPT TO=['[email protected]']
#4 To='"Rcpt TO" <[email protected]>' Cc=None RCPT TO=['[email protected]']
Expected: the same 3 emails the composer sends, with the same To / Cc headers.
Note on 19.0
On 19.0 the same root cause is worse: core stores an X-Msg-To-Add header on the mail.mail
listing every external recipient (Bcc partners included) and merges it into To at send time, so
the retry discloses the blind copies. That header does not exist on 18.0, which is why this issue
is only about the duplicate and the headers.
Suggested fix
Do not key the behaviour on the context: persist on the mail.mail that it was built with this
module's Cc / Bcc handling and read that in _prepare_outgoing_list().
- Lingua principale
- Python
- Stelle
- 36
- Fork
- 180
- Merge medio
- 4g 2h
- PR unite (30g)
- 14
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OCA/mail
-
[18.0] mail_drop_target: uploading a file to a Discuss channel fails (_get_as_sudo_from_request_or_raise no longer exists)Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
splunk/security_content#4418 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug / Enhancement]: Improve teleop_robot CLI with configurable timeout, robust input validation, and clean ROS shutdownForse già presa @muskan-creates352 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 3 giorni
-
bug(pipelines): shortcode stripping deletes text between a {{< >}} shortcode and the next {{% %}}Forse già presa @Ashborne-lab l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
kubeflow/docs-agent#293 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Imbad0202/academic-research-skills#1093 ·
I maintainer di solito rispondono entro 1 giorno
-
Input: placeholder drawn in the text colour when the empty Input is focused but not yet editedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pierreaubert/gpui-toolkit#114 ·
I maintainer di solito rispondono entro 1 giorno