mirror of
https://github.com/jonathan-martz/pocketbase-php-sdk.git
synced 2026-04-03 07:27:42 +00:00
fix mailer go
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
|||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"math/rand"
|
|
||||||
"net/smtp"
|
"net/smtp"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"time"
|
"time"
|
||||||
@@ -83,8 +82,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prepare the email body
|
// Prepare the email body
|
||||||
messageID := fmt.Sprintf("<%d.%d@%s>", now.UnixNano(), rand.Int(), smtpHost)
|
emailBody := fmt.Sprintf("Subject: %s\r\n\r\n%s", subject, string(countsJSON))
|
||||||
emailBody := fmt.Sprintf("Subject: %s\r\n\r\n Message-ID: %s \r\n\r\n %s", subject, messageID, string(countsJSON))
|
|
||||||
|
|
||||||
// Connect to the SMTP server
|
// Connect to the SMTP server
|
||||||
auth := smtp.PlainAuth("", *smtpUser, *smtpPass, smtpHost)
|
auth := smtp.PlainAuth("", *smtpUser, *smtpPass, smtpHost)
|
||||||
|
|||||||
Reference in New Issue
Block a user