发送邮件

This commit is contained in:
wh_zcy 2022-11-08 14:49:00 +08:00
parent 778050e61f
commit 8b1fdecbc0
2 changed files with 4 additions and 2 deletions

View File

@ -43,7 +43,9 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.SociatyAgreeReq) (
}
// 发邮件
this.module.modelSociaty.sendMail("GuildApproved", []string{sociaty.Name}, []string{uid})
if err := this.module.modelSociaty.sendMail("GuildApproved", []string{sociaty.Name}, []string{req.Uid}); err != nil {
this.module.Errorf("发送邮件id:GuildApproved uid:%v 失败 err:%v", uid, err)
}
//审核通过推送
this.module.SendMsgToUser(string(this.module.GetType()), "pagree", &pb.SociatyPAgreePush{

View File

@ -388,7 +388,7 @@ func (this *ModelSociaty) addMember(uid string, sociaty *pb.DBSociaty) error {
// 发邮件给公会成员
func (this *ModelSociaty) sendMail(confId string, params []string, receiver []string) error {
if module, err := this.moduleSociaty.service.GetModule(comm.ModuleMail); err == nil {
if module, err := this.service.GetModule(comm.ModuleMail); err == nil {
if mail, ok := module.(comm.Imail); ok {
mail.SendNewMail(&pb.DBMailData{
Cid: confId,