Company logo in emails with private self hosted instance

Hello,

I’m a fresh user of invoice ninja self hosted (docker container).
When I send invoice/quote emails, the company logo is not visible because my instance is private in my local network. So that make sense that the image is not visible.

I created an issue on the GitHub to ask this as a feature for generating base64 image in that situation but i’ve been told to use the IS_DOCKER env to do that. After looking briefly the code, yes it seems that this env make a base64 (don’t know if it generates especially in email, i didn’t go further in the code).

So, this is what i’ve done but nothing has changed, the logo url is still my private IP and not a base64 when i send an email.
When i added the env to the .env file, I recreated my docker container, I don’t know what to do else.

Thanks.

Hi,

@david can you please advise?

IS_DOCKER will fix the logo in the PDF, however for the email itself, it will always use a url reference to the logo.

you’ll want to create a custom email template which contains the base64 encoded logo

Ok, and if Im not wrong, there is no way to create email template in the UI (except for the body) ? I have to code something ?

Settings > Email Settings > Select Custom and you can insert your own email template there.

you’ll want to include the $body variable where the content (message) of the email should be delivered.

Thanks, I will give it a try.
In this custom template, what are all the variables available in addition to the $body? I mean, for example if I want to add the signature var, company var, … ?

Ok, $signature works, as well others like $company, …
Thanks.