跳到主要内容
版本:Current

邮件事件

调度入口:mailing/registry.py 的 notify_*。发送走 mailing/services.send_templated_email。HTTP 路径上通过 schedule_notification 在事务提交后开线程,避免卡住响应。

偏好分类​

mailing/preferences.py:

category用户设置字段场景
accountnotify_account欢迎信
recruitment_applicantnotify_recruitment_applicant申请进度、面试、结果
recruitment_chairnotify_recruitment_chair部长侧申请/预约
treasury_reimbursementnotify_treasury_reimbursement报销
treasury_income_remindernotify_treasury_income_reminder入账逾期
classroomnotify_classroom教室工单

全局关闭:email_notifications_enabled 或邮件脚一键退订。

事件一览(函数名)​

账号: notify_welcome

招新申请人: notify_application_submitted · notify_approved_to_interview · notify_application_rejected · notify_rejected_at_review · notify_accepted_direct · notify_interview_accepted · notify_interview_rejected · notify_interest_window_opened · notify_interest_hard_reject · notify_interest_soft_reject · notify_preference_rank_required · notify_offer_choice_opened · notify_offer_choice_reminder · notify_offer_choice_auto_assigned · notify_interview_booking_reminder · notify_interview_slots_updated · notify_interview_details_updated · notify_slot_booked · notify_interview_day_before_reminder · notify_slot_cancelled · notify_withdrawn_applications

招新部长: notify_applicant_withdrew_application · notify_chairs_interest_contacts 等(与上表部分共用 registry)

财务: notify_reimbursement_submitted · notify_reimbursement_reviewed · notify_transaction_reminder

教室: notify_classroom_request_submitted · notify_classroom_request_confirmed · notify_classroom_request_rejected · notify_classroom_request_cancelled

部长可在周期内配置录取/拒信文案(DepartmentEmailSettings)。offer_choice_* 相关函数仍存在,但 24h 催选 cron 已废弃;多部门以志愿排序为准。

新增邮件:registry 注册 → recipients → 模板上下文 → 偏好 category → 测试(mailing/tests.py)。