feat(emailApi): added setAt Datetime field support for Email Model
Build and Push Docker image / build-and-push (push) Successful in 3m14s
Details
Build and Push Docker image / build-and-push (push) Successful in 3m14s
Details
This commit is contained in:
parent
7e566798dd
commit
4d185f217b
|
@ -10,6 +10,7 @@ import (
|
|||
"github.com/pocketbase/pocketbase/tools/mailer"
|
||||
"github.com/pocketbase/pocketbase/tools/template"
|
||||
"net/mail"
|
||||
"time"
|
||||
)
|
||||
|
||||
// sendEmailToUser sends an email notification to a recipient of the email record
|
||||
|
@ -113,6 +114,7 @@ func sendEmails(app *pocketbase.PocketBase, emailRecord *models.Record) {
|
|||
|
||||
// mark email as sent
|
||||
emailRecord.Set("sentTo", sendToIds)
|
||||
emailRecord.Set("sentAt", time.Now())
|
||||
|
||||
// save email record
|
||||
if err := app.Dao().SaveRecord(emailRecord); err != nil {
|
||||
|
|
Loading…
Reference in New Issue