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

add SendWithEnvelopFrom #179

Merged
merged 1 commit into from
Jan 10, 2021

Conversation

cgroschupp
Copy link
Contributor

No description provided.

@jhillyerd
Copy link
Owner

Thanks for sending this PR, can you elaborate it's purpose? Do you need the from value send to the SMTP server to be different from that of the email headers?

If you are just looking to have multiple from addresses:

Each manipulation method returns a copy of the receiver struct. It can be considered immutable if the caller does not
modify the string and byte slices passed in. Immutability allows the headers or entire message to be reused across multiple threads.

This means you can setup an email and send it with different from already:

msg := Builder()
// configure message

msg.From("Bob", "bob@example.com").Send(...)
msg.From("Fred", "fred@example.com").Send(...)

@cgroschupp
Copy link
Contributor Author

@jhillyerd Yes, I need a different address in the envelope. I don't know if the function name 'SendWithEnvelopFrom' is the best, maybe you have a better idea.

@jhillyerd
Copy link
Owner

jhillyerd commented Nov 22, 2020

I feel using the term envelope here could be confusing since the parsing portion of the library has an Envelope struct. It appears the RFCs use the term "return path" -- but that also seems a bit dated. How about WithReturnAddress?

@jhillyerd
Copy link
Owner

Friendly ping on function rename

@cgroschupp
Copy link
Contributor Author

@jhillyerd sorry for the delay.

@jhillyerd jhillyerd merged commit 8f6464c into jhillyerd:master Jan 10, 2021
@jhillyerd
Copy link
Owner

Thanks for this!

@jhillyerd
Copy link
Owner

Heads up that this got renamed to SendWithReversePath in #182

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.

2 participants