package main import ( "fmt" "net/smtp" "strings" ) func SendToMail (user, password, host, to, subject, body, mailtype string ) error { hp := strings. Split (host, ":" ) auth := smtp. PlainAuth ( "" , user, password, hp[ 0 ]) var content_type string if mailtype == "html" { content_type = "Content-Type: text/" + mailtype + "; charset=UTF-8" } else { content_type = "Content-Type: text/plain" + "; charset=UTF-8" ...