90f4e0b746
Signed-off-by: dab246 <tdvu@linagora.com>
1.7 KiB
1.7 KiB
65. Logic for reply email
Date: 2025-04-21
Status
Accepted
Context
- The email reply logic is quite complex so to avoid mistakes and regression of errors later.
Decision
Brief the logic flow to easily follow changes during email reply process:
1. Reply:
- If the user is the
sender
To = email.to
Cc, Bcc, ReplyTo = Empty
- Otherwise, If the email has a
List-Postheader then:
To = email.from.withoutUser
Cc, Bcc, ReplyTo = Empty
- Otherwise, If the email without a
List-Postheader,email.replyTois not empty then:
To = email.replyTo.withoutUser
Cc, Bcc, ReplyTo = Empty
- Otherwise:
To = email.from.withoutUser
Cc, Bcc, ReplyTo = Empty
2. Reply To List:
- If the email has a
List-Postheader then:
To = email.List-Post.withoutUser
Cc, Bcc, ReplyTo = Empty
- Otherwise: There is no
Reply To Listfeature
- Reply all
- If the user is the sender
To = email.to.withoutUser
Cc = email.cc.withoutUser
Bcc = email.bcc.withoutUser
ReplyTo = email.replyTo.withoutUser
- Otherwise, If the email has a
List-Postheader then:
To = (email.replyTo + email.from + email.to).withoutUser
Cc = email.cc.withoutUser
Bcc = email.bcc.withoutUser
ReplyTo = Empty
- Otherwise, If the email without a
List-Postheader,email.replyTois not empty then:
To = (email.replyTo + email.to).withoutUser
Cc = email.cc.withoutUser
Bcc = email.bcc.withoutUser
ReplyTo = Empty
- Otherwise
To = (email.from + email.to).withoutUser
Cc = email.cc.withoutUser
Bcc = email.bcc.withoutUser
ReplyTo = Empty
Consequences
- Any changes to reply email should be updated in this ADR.