Skip to content

Commit

Permalink
Merge pull request #6 from vzsg/fix-sendgrid
Browse files Browse the repository at this point in the history
[SendGrid] Fix recipient getting sent as reply-to address
  • Loading branch information
rafiki270 authored Sep 7, 2018
2 parents f6950f9 + d914588 commit d9542f2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Sources/MailCore/Extensions/Message+SendGrid.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ extension Mailer.Message {
]
)
}
let message = SendGridEmail(from: EmailAddress(email: from), replyTo: EmailAddress(email: to), subject: subject, content: content)

let message = SendGridEmail(
personalizations: [Personalization(to: [EmailAddress(email: to)])],
from: EmailAddress(email: from),
subject: subject,
content: content)

return message
}

Expand Down

0 comments on commit d9542f2

Please sign in to comment.