I just started with NodeJs so I don't know how to show images in NodeJs. I have referred my all code and the problem which I am facing.
exports.sendWelcomeEmail = functions.auth.user().onCreate((user) => {
const email = user.email; // The email of the user.
const displayName = user.displayName; //The name of user
const image = user.photoURL; // The image url of user
// [END eventAttributes]
return sendWelcomeEmail(email, displayName, image);
});
function sendWelcomeEmail(email, displayName , image) {
const mailOptions = {
from: `${APP_NAME} <noreply@firebase.com>`,
to: email,
};
mailOptions.subject = `Welcome to ${APP_NAME}!`;
mailOptions.html = `
Hey ${name || ''}! Welcome to ${APP_NAME}.
<br />
<img src="image">
<br/>
We hope you will enjoy our service. <br/> `;
return mailTransport.sendMail(mailOptions).then(() => {
return console.log('New welcome email sent to:', email);
});
}
Here the image is not shown in html so how I can pass the image variable which contains the image url in below code
<img src="image">