Skip to content

Commit

Permalink
return err
Browse files Browse the repository at this point in the history
  • Loading branch information
KN4CK3R committed Jan 14, 2023
1 parent 93b3469 commit 661c367
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions services/mailer/incoming/incoming.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,20 @@ func Init(ctx context.Context) error {
return nil
}

addressTokenRegex = regexp.MustCompile(
var err error
addressTokenRegex, err = regexp.Compile(
fmt.Sprintf(
`\A%s\z`,
strings.Replace(regexp.QuoteMeta(setting.IncomingEmail.ReplyToAddress), regexp.QuoteMeta(setting.IncomingEmail.TokenPlaceholder), "(.+)", 1),
),
)
referenceTokenRegex = regexp.MustCompile(fmt.Sprintf(`\Areply-(.+)@%s\z`, regexp.QuoteMeta(setting.Domain)))
if err != nil {
return err
}
referenceTokenRegex, err = regexp.Compile(fmt.Sprintf(`\Areply-(.+)@%s\z`, regexp.QuoteMeta(setting.Domain)))
if err != nil {
return err
}

go func() {
ctx, _, finished := process.GetManager().AddTypedContext(ctx, "Incoming Email", process.SystemProcessType, true)
Expand Down

0 comments on commit 661c367

Please sign in to comment.