mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-02-05 00:29:40 +03:00
Email notifications does not send Base64 encoded images #968
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @speedygonzales391 on GitHub (Mar 10, 2021).
Email notifications does not send Base64 encoded images from templates
We would like to use email templates with Base64 encoded images. So we use own templates - it works. But if we use
<img src="data:image/png;base64,iVBORw...." alt="aaa" />, images are not send.Deployment environment
Your environment (Generated via diagnostics page)
Config (Generated via diagnostics page)
Steps to reproduce
Use own email templates with image encoded into Base64 and tag for example
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPUAAACzCAIAAADe0s1DAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAK/SURBVHhe7dnBbepAFEDR1OWCXA/V0IyL4ZvgJOaTBZuRMlfnbEDmLa+eZszHDbr0TZm+KdM3ZfqmTN+U6ZsyfVOmb8r0TZm+KdM3ZfqmTN+U6ZsyfVOmb8r0TZm+KdM3ZfqmTN+U6ZsyfVOmb8r0TZm+KdM3ZfqmTN+U6ZsyfVOmb8r0TZm+KdM3ZfqmTN+U6ZsyfVOmb8r0TZm+KdM3ZfqmTN+U6ZsyfVOmb8r0TZm+KdM3ZfqmTN+U6ZsyfVOmb8r0TZm+KdM3ZfqmTN+U6ZsyfVOmb8r0TZm+KdM3ZfqmTN+U6ZsyfVOmb8r0TZm+KdM3ZfqmTN+U6ZsyfVOmb8r0TZm+KdM3ZfqmTN+U6ZsyfVOmb8r0TZm+KdM3ZfqmTN+U6ZsyfVOmb8r0TZm+KdM3ZTP2vV0vl3VZPr4ty7Jet+PXsxGTzGS6vq/rEeBub/CU5N7jMfMwYpLJzNj3sl6eN+t2eRS5XM6PR0wymcj5+9jAb2zbEZP8WZG+j237xrIdMcmfNWnf234fXNf9QvjlXuKvLY6YZBrz9b1d16O8V88tjphkLrP1fRyK7/fB7dTdL2eJEZPMZrK+jxRfmnttccQk05mz75d3Gq+NjphkOpP1fezUp+i2y/fh+fR4xCTTme5+eWzVu593HPevnx/nFkdMMpnp+t7d33Z8RbhX+PnP4yPR/1scMclMZuwb3qVvyvRNmb4p0zdl+qZM35TpmzJ9U6ZvyvRNmb4p0zdl+qZM35TpmzJ9U6ZvyvRNmb4p0zdl+qZM35TpmzJ9U6ZvyvRNmb4p0zdl+qZM35TpmzJ9U6ZvyvRNmb4p0zdl+qZM35TpmzJ9U6ZvyvRNmb4p0zdl+qZM35TpmzJ9U6ZvyvRNmb4p0zdl+qZM35TpmzJ9U6ZvyvRNmb4p0zdl+qZM35TpmzJ9U6Zvum63f2lFcr95QrhyAAAAAElFTkSuQmCC" alt="aaa" />and use for example Test SMTP email from Bitwarden_rs admin.Expected behaviour
Bitwarden_rs send email with image in html message.
Actual behaviour
Images in email does not send.
Troubleshooting data
@daniel-qima commented on GitHub (Mar 10, 2021):
try to login /admin and check the General Setting > Domain URL, make sure the value is your domain.

@speedygonzales391 commented on GitHub (Mar 10, 2021):
Yes Domain URL is set
@paolobarbolini commented on GitHub (Mar 11, 2021):
Hello, I'm not part of the bitwarden_rs team, but I do maintain the
lettrecrate, which bitwarden_rs uses for sending emails.Assuming the template has been written correctly, one way of debugging this issue could be to download the raw email from your email client as an
.emlfile and attaching it here.Before posting the

.emlfile open it with a text editor and remove all of the private email headers. Basically the part we are interested in begins here, everything that comes before should be erased:One last note: since the SMTP test email body contains the instance url, to avoid posting it publicly you could temporarily configure a different url as the instance url.
@BlackDex commented on GitHub (Mar 11, 2021):
I just did a test my self, and it DOES add the image, only Google/Gmail if filtering this during the view in the web-interface.
I also tested this on Outlook365, and it works there too.
This is on gmail:

This is that same mail on thunderbird:
