I want to embed inline images with mailgun, however the documentation for sending attachments doesnt seem to match with the latest mailgun.js
NOT mailgun-js
https://www.npmjs.com/package/mailgun.js
the mentioned docs in this readme do not exist: https://documentation.mailgun.com/api-sending.html#sending << 404's
The readme docs for this version say this:
But where do I even add an attachment? How do I set mailgun to use multipart/form-data
encoding? Where/ what parameter do I use to add an attachment? There are no good type definitions either
If i have this code below, how do I just add an attachment? What's the object schema? Does it even go here? I have no clue
mg.messages.create('sandbox-123.mailgun.org', {
from: "Excited User <[email protected]>",
to: ["[email protected]"],
subject: "Hello",
text: "Testing some Mailgun awesomness!",
html: "<h1>Testing some Mailgun awesomness!</h1>"
})
Even once set as an attachment, how do I reference it in the email to use in <img>
?
Anyone that has done with the latest mailgun.js
please share your reference code. The documentation is outdated