-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic Vapor Email #2
base: main
Are you sure you want to change the base?
Conversation
Just reposting @mcdappdev reply to the previous PR, as I closed that and opened this one instead.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great so far. :)
This PR serves as a discussion and W.I.P for this repository and the API.
EmailClient
So far I've implemented
EmailClient
that providers must conform to, which allows to send aEmailMessage
.EmailAddress
You specify the sender and recipients with the
EmailAddress
type, which can be initialized by a string in the following formats:"[email protected]"
-> name:nil
, email:"[email protected]"
"Vapor <[email protected]>
" -> name:"Vapor"
, email:"[email protected]"
EmailAddressRepresentable
Another thing I've added is a
EmailAddressRepresentable
protocol, which can be added to aUser
for example and then you can do: