diff --git a/application/controllers/admin.php b/application/controllers/admin.php
index 57f07bd..fb3a9e2 100644
--- a/application/controllers/admin.php
+++ b/application/controllers/admin.php
@@ -62,7 +62,9 @@ public function pay() {
$this->user->set_paid($data['id']);
$query= $this->user->get_user_by_id($data['id']);
$mail = $query['mail'];
- $this->email->send_fee_received_mail($mail, $data['school'], $data['bill']);
+ $association_name = $query['association_name'];
+ $this->email->send_fee_received_and_invitation_mail($mail, $data['school'], $data['bill'], $association_name);
+
$response = array(
'code' => '0',
'msg' => '操作成功!'
diff --git a/application/libraries/MY_Email.php b/application/libraries/MY_Email.php
index 6e6da1d..f904b55 100644
--- a/application/libraries/MY_Email.php
+++ b/application/libraries/MY_Email.php
@@ -69,13 +69,37 @@ public function send_account_confirm_mail($mail) {
}
/*
- * Send mail after money is received.
+ * Send mail of confirmation and invitation after money is received.
+ * $subject and $invitation needs to be updated.
*/
- public function send_fee_received_mail($mail, $school, $fee) {
- $subject = '第十六届全国高校自行车交流赛缴费确认';
+ public function send_fee_received_and_invitation_mail($mail, $school, $fee, $association_name) {
+ $subject = '第十六届全国高校自行车交流赛缴费确认及邀请函';
$id = $this->ci->user->get_id($mail);
$id_message='
贵高校本次比赛的ID是' . $id . ',请领队同学务必牢记,并在比赛签到时出示。
祝好!
北京大学自行车协会';
- $message = $school . ',
贵校车协交来的' . $fee . '元参赛费用已经收到,感谢你们对北大赛的大力支持!如有任何问题,请直接与各地区负责联系。' . $id_message;
+ $invitation_message = '
+
+ 致 ' . $school . ' ' . $association_name . ': +
+
+ 北京大学自行车协会将于5月4日、5日和6日分别在北京大学和河北廊坊市固安县永定河自行车公园举办“北大车协 · 第十六届全国高校自行车交流赛”。本届比赛由xxx举办,并得到了xxx的大力支持。
+ 贵协作为全国知名的高校自行车运动社团,协会会员自行车运动水平优秀,学生素质高尚优良。我们诚挚邀请贵协参加“北大车协 · 第十六届全国高校自行车交流赛”, 以车会友,交流学习。
+
+ 北京大学自行车协会
+ 2018年4月
+