diff options
| -rw-r--r-- | lib/awmail/index.js | 13 | ||||
| -rw-r--r-- | templates/email.html | 8 |
2 files changed, 17 insertions, 4 deletions
diff --git a/lib/awmail/index.js b/lib/awmail/index.js index f7a758b..e516a44 100644 --- a/lib/awmail/index.js +++ b/lib/awmail/index.js @@ -45,6 +45,9 @@ function AWMail (options) { { name: 'lines', maxCount: 1 }, { name: 'plain', maxCount: 1 }, ]) + + var logoImage = fs.readFileSync('../../public/assets/img/logo.png') + var armoryImage = fs.readFileSync('../../public/assets/img/armory.png') router.post('/send', multerMiddleware, function (req, res) { res.header('Access-Control-Allow-Origin', '*') @@ -218,13 +221,21 @@ function AWMail (options) { image.path = 'face.jpg' image.end(content.image.buffer) + var logo = new PassThrough() + logo.path = 'logo.jpg' + logo.end(logoImage) + + var armory = new PassThrough() + armory.path = 'armory.jpg' + armory.end(armoryImage) + return mg.messages.create(config.domain, { from: config.from, to: [content.email], subject: config.subject, text: content.text, html: content.html, - inline: [image], + inline: [image, logo, armory], }) } diff --git a/templates/email.html b/templates/email.html index fe786f7..ea91352 100644 --- a/templates/email.html +++ b/templates/email.html @@ -1,7 +1,9 @@ -Thank you for visiting Hansel and Gretel at the Armory. +<div style='background-color: black; color: white; text-align: center;'> +<a href='https://hanselgretelarmory.com/'><img src='cid:logo.png' style='height: 40px'></a> <br><br> -<img src='cid:face.jpg'> +<a href='https://hanselgretelarmory.com/photo/{{id}}'><img src='cid:face.jpg'></a> <br><br> <a href='https://hanselgretelarmory.com/photo/{{id}}'>Download your photo</a> <br><br> - +<a href='http://armoryonpark.org/'><img src='cid:armory.png' style='height: 30px'></a> +</div>
\ No newline at end of file |
