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

fix: add custom sender name to "from" header #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kangmingtay
Copy link

@kangmingtay kangmingtay commented Jul 1, 2021

Current workaround:

mail := gomail.NewMessage()
from := mail.FormatAddress(address, senderName)

// create mailer struct
mailer := &Mailer{..., From: from}

// invoke Mail method
err := mailer.Mail(...)

Future use:

mailer := &Mailer{..., From: "[email protected]", SenderName: "Alice"}
err := mailer.Mail()

I think it would be nicer if i didn't have to create mail and from and FormatAddress of the sender outside of the mailme package when it can be handled inside the Mail method. :)

@kangmingtay kangmingtay requested a review from a team as a code owner July 1, 2021 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant