eladnava/mailgen

product logo from local disk

rachiitgupta opened this issue · 2 comments

I wanted to use logo from my local system -
var mailGenerator = new Mailgen({
theme: 'cerberus',
product: {
// Appears in header & footer of e-mails
name: 'abc,
link: 'https://www.abc.co',
logo: 'images/logo.png' HOW TO ADD RELATIVE PATH HERE ?
// Optional product logo
// logo: 'https://mailgen.js/img/logo.png'
}
});

Hi @rachiitgupta,
I'd be glad to assist.

When you send an e-mail over the Internet, the recipient device or machine will not have access to the image file on your computer. The solution is to host that image file on the Internet, and link to it.

You can use a service such as Amazon S3 to host your image and provide you a URL you can link to, or imgbb for a quicker and dirtier solution.

Thanks @eladnava for the response, this would help!