vestigial (#50, #51)

This commit is contained in:
Michael Quigley 2022-09-12 15:29:25 -04:00
parent aa19870d41
commit 0dae5d3118
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -1,33 +0,0 @@
package main
import (
"github.com/michaelquigley/pfxlog"
"github.com/sirupsen/logrus"
"net/smtp"
"os"
)
func init() {
pfxlog.GlobalInit(logrus.InfoLevel, pfxlog.DefaultOptions().SetTrimPrefix("github.com/openziti-test-kitchen/"))
}
func main() {
from := "ziggy@zrok.io"
to := []string{"michael@quigley.com"}
host := "smtp.email.us-ashburn-1.oci.oraclecloud.com"
port := "587"
msg := "Subject: Ziggy\r\n" +
"\r\n" +
"Hello from Ziggy!\r\n"
body := []byte(msg)
auth := smtp.PlainAuth("", os.Args[1], os.Args[2], host)
err := smtp.SendMail(host+":"+port, auth, from, to, body)
if err != nil {
panic(err)
}
logrus.Infof("message sent")
}