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 support for BCC #8

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

Conversation

delbertooo
Copy link

As mailhog is primarily a debugging tool we want to validate the correctness of bcc and cc as well.

See #98, #261

Possible solutions

  • multiply the emails for each recipient
  • show cc and bcc addresses in the preview

Duplicating emails won't help debugging and may make it even worse. So we went for the "show in preview" option.

Implementation

Bcc should not be contained in the mail source. Otherwise it wouldn't be a "blind" copy as the recipients could see the blind copy recipients. Every recipient (to, cc, bcc) should be part of the RCPT though. So from my understanding and the insight of this Mailtrap article bcc should be allRecipients - to - cc. This calculated bcc is what I implemented and added to the Message struct.

On the GUI side I decided to follow the suggestion of
jankonas
and show cc and bcc alongside with "from" and "subject". Cc and bcc are only shown if they have content. This way the user can easily debug who should've received the mail.

@delbertooo
Copy link
Author

I built a docker image as a preview with the cc/bcc support added by this pull requests. You can find it at delbertooo/mailhog-bcc.

@msde
Copy link

msde commented Oct 6, 2021

I needed exactly this yesterday, and the supplied docker image worked as expected.

@w455im
Copy link

w455im commented Oct 24, 2022

Hello, can this be merged please ? it is very much needed 😞

@JoeFowlerJDi
Copy link

Another +1 for merging this, or else doing something else like it.

The current behaviour of ignoring bcc can very easily be mistaken for a bug on the mail sender's side. I had to do a little digging to realise that we were setting the bcc correctly, it just doesn't show up in mailhog.

@konigprinz
Copy link

Please merge this. As a developer, this is a very useful feature.

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.

6 participants