pycontw / mail_handler

Mail toolkit for PyCon Taiwan
https://pycontw.github.io/mail_handler/
MIT License
11 stars 11 forks source link

[Feature Request] Support multiple proposals with same mail address #26

Closed kunxianhuang closed 3 years ago

kunxianhuang commented 3 years ago

If proposal with the same mail address ("receiver_email" blank in json file), the file in mails_to_send will be rewrite to newest one. So, render mail should name file as ooo@xxx.com__2 if multiple proposal with same address. Then, sendmail can detect the file and drop its tail.

[Use Case] When CfP goes into 2nd stage, if there are multiple proposals (N proposals) submitted by one person are accepted in the stage 1 review, the person will be notified with N emails for N proposals.

kunxianhuang commented 3 years ago

Sorry, I pushed close.

kunxianhuang commented 3 years ago

Replacing latest value with the same key is in below https://github.com/pycontw/mail_handler/blob/master/mail_handler/render_mail.py#L30

kunxianhuang commented 3 years ago

Make some changes and pull request at below https://github.com/pycontw/mail_handler/pull/27

kunxianhuang commented 3 years ago

Solved by using defaultdict and merge it at below. Close this issue. https://github.com/pycontw/mail_handler/pull/28