Skip to content

Commit

Permalink
feat: replace logo in example with one with right size.
Browse files Browse the repository at this point in the history
  • Loading branch information
matcornic committed Jan 26, 2020
1 parent 3d297b4 commit 4f421ce
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions examples/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func main() {
Product: hermes.Product{
Name: "Hermes",
Link: "https://example-hermes.com/",
Logo: "http://www.duchess-france.org/wp-content/uploads/2016/01/gopher.png",
Logo: "https://github.com/matcornic/hermes/blob/master/examples/gopher.png?raw=true",
},
}
sendEmails := os.Getenv("HERMES_SEND_EMAILS") == "true"
Expand Down Expand Up @@ -51,28 +51,28 @@ func main() {
// Send emails only when requested
if sendEmails {
port, _ := strconv.Atoi(os.Getenv("HERMES_SMTP_PORT"))
password := os.Getenv("HERMES_SMTP_PASSWORD")
password := os.Getenv("HERMES_SMTP_PASSWORD")
SMTPUser := os.Getenv("HERMES_SMTP_USER")
if password == "" {
fmt.Printf("Enter SMTP password of '%s' account: ", SMTPUser)
bytePassword, _ := terminal.ReadPassword(0)
password = string(bytePassword)
}
smtpConfig := smtpAuthentication{
Server: os.Getenv("HERMES_SMTP_SERVER"),
Port: port,
SenderEmail: os.Getenv("HERMES_SENDER_EMAIL"),
Server: os.Getenv("HERMES_SMTP_SERVER"),
Port: port,
SenderEmail: os.Getenv("HERMES_SENDER_EMAIL"),
SenderIdentity: os.Getenv("HERMES_SENDER_IDENTITY"),
SMTPPassword: password,
SMTPUser: SMTPUser,
SMTPPassword: password,
SMTPUser: SMTPUser,
}
options := sendOptions{
To: os.Getenv("HERMES_TO"),
}
for _, theme := range themes {
h.Theme = theme
for _, e := range examples {
options.Subject = "Testing Hermes - Theme "+h.Theme.Name() + " - Example " + e.Name()
options.Subject = "Hermes | " + h.Theme.Name() + " | " + e.Name()
fmt.Printf("Sending email '%s'...\n", options.Subject)
htmlBytes, err := ioutil.ReadFile(fmt.Sprintf("%v/%v.%v.html", h.Theme.Name(), h.Theme.Name(), e.Name()))
if err != nil {
Expand All @@ -82,7 +82,7 @@ func main() {
if err != nil {
panic(err)
}
err = send(smtpConfig, options,string(htmlBytes), string(txtBytes))
err = send(smtpConfig, options, string(htmlBytes), string(txtBytes))
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 4f421ce

Please sign in to comment.