i'am newbie of nodejs world. want send email embedded image. image didn't show in email. thought might file path setting. here mailoptions,
var mailoptions = { from: 'mymail@gmail.com', to: to, subject: subject, html: html, attachments: [{ filename: "logo.png", filepath: "/images/logo.png", cid: "logo-mail" }] }; and directory keeps static files is
myproject/ assets/ images/ js/ styles/ and html,
<img src="cid:logo-mail" /> here result in email,
<img src="cid.php?mid=e_zghjaqv4zqllagnkzqnjzgn1aqt3zt==&pj=logo-mail" alt="cid.php?mid=e_zghjaqv4zqllagnkzqnjzgn1aq"> i not sure right set file path ?
filepath: "/images/logo.png"
i did
filepath: process.cwd() + "/assets/images/logo.png" and it's working !
thanks helping.