I tried to send a email using golang smtp https://github.com/golang/go/wiki/SendingMail and able to send email properly. Below is the code snippet
func sendEmail(server string) {
// Connect to the server, set the sender and recipient,
// and send the email all in one step.
headers := make(map[string]string)
headers["Subject"] = "Hi-Pri# Server " + server + " down"
headers["From"] = "YYYY@net"
headers["To"] = "XXXX@net"
body := "Hello, Test"
// Setup message
message := ""
for k, v := range headers {
message += fmt.Sprintf("%s: %s
", k, v)
}
message += "
" + body
err := smtp.SendMail(
"test.com:25",
nil,
"YYYY@net",
[]string{"XXXX@net"},
[]byte(message),
)
if err != nil {
log.Fatal(err)
}
Im trying to send a hipri mail but couldn't fine the option to make a mail as hirpri or important one. Can someone help me