Created
January 30, 2018 18:20
-
-
Save schoettker/abdc03ca970a2e3fd815cd12bb500a97 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "github.com/mailjet/mailjet-apiv3-go" | |
| ) | |
| func main() { | |
| publicKey := "XXXXX" | |
| secretKey := "XXXXX" | |
| mj := mailjet.NewMailjetClient(publicKey, secretKey) | |
| param := &mailjet.InfoSendMail{ | |
| FromEmail: "lennart.schoettker@atmina.de", | |
| FromName: "Max Mustermann", | |
| Recipients: []mailjet.Recipient{ | |
| mailjet.Recipient{ | |
| Email: "lennartschoettker@hotmail.com", | |
| }, | |
| }, | |
| Subject: "Hello World!", | |
| TextPart: "Hi there !", | |
| } | |
| res, err := mj.SendMail(param) | |
| if err != nil { | |
| fmt.Println(err) | |
| } else { | |
| fmt.Println("Success") | |
| fmt.Println(res) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment