few-electrician-23747
04/13/2023, 10:48 AMFailed to send email to
I have infact generated the credentials from https://ethereal.email/create and used the same package you guys have used that is nodemailer and I am able to. But when I deploy with same credentials then no luck. I am stuck here for 2 weeks and its pretty urgent for mefresh-football-47124
few-electrician-23747
04/13/2023, 11:22 AMpackage main
import (
"fmt"
"net/smtp"
)
func main() {
// Sender data.
username := "emilio.lehner@ethereal.email"
password := "uCfXFjR1qdjzjgNyME"
// Receiver email address.
to := []string{
"<http://XYZ.com|XYZ.com>",
}
// smtp server configuration.
smtpHost := "smtp.ethereal.email"
smtpPort := "587"
// Message.
message := []byte("This is a test email message.")
// Authentication.
auth := smtp.PlainAuth("", username, password, smtpHost)
// Sending email.
err := smtp.SendMail(smtpHost+":"+smtpPort, auth, username, to, message)
if err != nil {
fmt.Println(err)
return
}
fmt.Println("Email Sent Successfully!")
}
fresh-football-47124
few-electrician-23747
04/13/2023, 11:24 AMfresh-football-47124
few-electrician-23747
04/13/2023, 11:26 AMfresh-football-47124
docker container logs [OPTIONS] <CONTAINER-NAME OR ID>
or similar?few-electrician-23747
04/14/2023, 3:24 AM