Skip to content
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

Use mail.Address instead of plain strings #11

Open
ivanjaros opened this issue Nov 14, 2020 · 4 comments
Open

Use mail.Address instead of plain strings #11

ivanjaros opened this issue Nov 14, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@ivanjaros
Copy link

With simple plain strings we are unable to set the name, only the address of the recipient(s).
Use mail.Address.String() for headers, where full format works, and use mail.Address.Address for smtp's mail and rcpt methods to make it work with the smtp protocol.

@xhit
Copy link
Owner

xhit commented Nov 16, 2020

If I can understand, do you want set the name of recipient?

@ivanjaros
Copy link
Author

ivanjaros commented Nov 16, 2020

yes:
Mr. Foo Bar <foo@bar.baz>

Just keep in mind what I wrote above - you can use this format only in headers not in the smtp's methods which expect just plain email address.

@xhit xhit added the enhancement New feature or request label Nov 16, 2020
@xhit
Copy link
Owner

xhit commented Nov 16, 2020

I got it. I prefer use the plain string because I don't want to do a breaking change now. I will think how to maintain both ways instead dropping the current.

@xhit
Copy link
Owner

xhit commented Nov 18, 2021

It's time to V3 so make all your ideas here: #53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants