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

Handle CC and BCC as recipients #21

Closed
wants to merge 1 commit into from
Closed

Conversation

AGhost-7
Copy link

@AGhost-7 AGhost-7 commented May 9, 2017

Fixes issue #20

for _,cc := range strings.Split(msg.Header.Get("Cc"), ",") {
recip = append(recip, strings.TrimSpace(cc))
}
for _,bcc := range strings.Split(msg.Header.Get("Bcc"), ",") {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this works correctly. As far as I know the Bcc is no part of the header, right?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worked for me, I was using my fork for a while.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably won't work correctly if there's a comma as part of the recipient's name (in quotes).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didnt think of that use case, good catch. Unfortunately I no longer use msendmail, if someone else wants to pick up this PR please feel free. I don't think it will get merged however. I've been using swaks with maildev instead.

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.

4 participants