{"modulePath":"github.com/answerdev/answer","version":"v1.2.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package export\n\n## Types\n\n```go\ntype EmailConfig struct {\n\tFromEmail          string `json:\"from_email\"`\n\tFromName           string `json:\"from_name\"`\n\tSMTPHost           string `json:\"smtp_host\"`\n\tSMTPPort           int    `json:\"smtp_port\"`\n\tEncryption         string `json:\"encryption\"` // \"\" SSL\n\tSMTPUsername       string `json:\"smtp_username\"`\n\tSMTPPassword       string `json:\"smtp_password\"`\n\tSMTPAuthentication bool   `json:\"smtp_authentication\"`\n}\n```\nEmailConfig email config\n\n```go\nfunc (e *EmailConfig) IsSSL() bool\n```\n\n```go\ntype EmailRepo interface {\n\tSetCode(ctx context.Context, code, content string, duration time.Duration) error\n\tVerifyCode(ctx context.Context, code string) (content string, err error)\n}\n```\nEmailRepo email repository\n\n```go\ntype EmailService struct {\n\t// contains filtered or unexported fields\n}\n```\nEmailService kit service\n\n```go\nfunc NewEmailService(\n\tconfigService *config.ConfigService,\n\temailRepo EmailRepo,\n\tsiteInfoService siteinfo_common.SiteInfoCommonService,\n) *EmailService\n```\nNewEmailService email service\n\n```go\nfunc (es *EmailService) ChangeEmailTemplate(ctx context.Context, changeEmailUrl string) (title, body string, err error)\n```\n\n```go\nfunc (es *EmailService) GetEmailConfig(ctx context.Context) (ec *EmailConfig, err error)\n```\n\n```go\nfunc (es *EmailService) NewAnswerTemplate(ctx context.Context, raw *schema.NewAnswerTemplateRawData) (\n\ttitle, body string, err error)\n```\nNewAnswerTemplate new answer template\n\n```go\nfunc (es *EmailService) NewCommentTemplate(ctx context.Context, raw *schema.NewCommentTemplateRawData) (\n\ttitle, body string, err error)\n```\nNewCommentTemplate new comment template\n\n```go\nfunc (es *EmailService) NewInviteAnswerTemplate(ctx context.Context, raw *schema.NewInviteAnswerTemplateRawData) (\n\ttitle, body string, err error)\n```\nNewInviteAnswerTemplate new invite answer template\n\n```go\nfunc (es *EmailService) NewQuestionTemplate(ctx context.Context, raw *schema.NewQuestionTemplateRawData) (\n\ttitle, body string, err error)\n```\nNewQuestionTemplate new question template\n\n```go\nfunc (es *EmailService) PassResetTemplate(ctx context.Context, passResetUrl string) (title, body string, err error)\n```\n\n```go\nfunc (es *EmailService) RegisterTemplate(ctx context.Context, registerUrl string) (title, body string, err error)\n```\n\n```go\nfunc (es *EmailService) SaveCode(ctx context.Context, code, codeContent string)\n```\nSaveCode save code\n\n```go\nfunc (es *EmailService) Send(ctx context.Context, toEmailAddr, subject, body string)\n```\nSend email send\n\n```go\nfunc (es *EmailService) SendAndSaveCode(ctx context.Context, toEmailAddr, subject, body, code, codeContent string)\n```\nSendAndSaveCode send email and save code\n\n```go\nfunc (es *EmailService) SendAndSaveCodeWithTime(\n\tctx context.Context, toEmailAddr, subject, body, code, codeContent string, duration time.Duration)\n```\nSendAndSaveCodeWithTime send email and save code\n\n```go\nfunc (es *EmailService) SetEmailConfig(ctx context.Context, ec *EmailConfig) (err error)\n```\nSetEmailConfig set email config\n\n```go\nfunc (es *EmailService) TestTemplate(ctx context.Context) (title, body string, err error)\n```\nTestTemplate send test email template parse\n\n```go\nfunc (es *EmailService) VerifyUrlExpired(ctx context.Context, code string) (content string)\n```\nVerifyUrlExpired email send\n\n","path":"github.com/answerdev/answer/internal/service/export","name":"export","synopsis":"","isRedistributable":true}
