Skip to content

Commit

Permalink
Fix for the From header.
Browse files Browse the repository at this point in the history
  • Loading branch information
Siposattila committed May 29, 2024
1 parent fa6311f commit d5a84b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/email/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (c *client) Send(e interfaces.EmailInterface) {

var body bytes.Buffer
mimeHeaders := "MIME-version: 1.0;\nContent-Type: text/html; charset=\"UTF-8\";\n\n"
body.Write([]byte(fmt.Sprintf("Subject: %s \nFrom: %s \nTo: %s \n%s\n\n", c.body.GetSubject(), c.body.GetCompany(), e.GetEmail(), mimeHeaders)))
body.Write([]byte(fmt.Sprintf("Subject: %s \nFrom: %s \nTo: %s \n%s\n\n", c.body.GetSubject(), c.body.GetCompany()+" <"+c.email+">", e.GetEmail(), mimeHeaders)))

unsubscribeUrl := c.body.GetUnsubscribe() + "/" + e.GetEmail()
greeting := strings.ReplaceAll(c.body.GetGreeting(), "[name]", e.GetName())
Expand Down

0 comments on commit d5a84b0

Please sign in to comment.