MCPcopy Index your code
hub / github.com/apache/answer / SendAndSaveCode

Method SendAndSaveCode

internal/service/export/email_service.go:102–109  ·  view source on GitHub ↗

SendAndSaveCode send email and save code

(ctx context.Context, userID, toEmailAddr, subject, body, code, codeContent string)

Source from the content-addressed store, hash-verified

100
101// SendAndSaveCode send email and save code
102func (es *EmailService) SendAndSaveCode(ctx context.Context, userID, toEmailAddr, subject, body, code, codeContent string) {
103 err := es.emailRepo.SetCode(ctx, userID, code, codeContent, constant.UserEmailCodeCacheTime)
104 if err != nil {
105 log.Error(err)
106 return
107 }
108 es.Send(ctx, toEmailAddr, subject, body)
109}
110
111// SendAndSaveCodeWithTime send email and save code
112func (es *EmailService) SendAndSaveCodeWithTime(

Callers 6

SendUserActivationMethod · 0.80
RetrievePassWordMethod · 0.80
UserRegisterByEmailMethod · 0.80
UserVerifyEmailSendMethod · 0.80

Calls 2

SendMethod · 0.95
SetCodeMethod · 0.65

Tested by

no test coverage detected