diff --git a/servicio-notificaciones/src/email.controller.ts b/servicio-notificaciones/src/email.controller.ts
index 1b607d22..c18340a0 100644
--- a/servicio-notificaciones/src/email.controller.ts
+++ b/servicio-notificaciones/src/email.controller.ts
@@ -23,15 +23,23 @@ export class EmailController {
@MessagePattern({ cmd: 'html' })
async postHTMLEmail(@Payload() user: any) {
const url = "http://localhost:3000/";
+ const image = "images/email.ong";
var response = await this.mailService.sendMail({
to: user["email"],
from: "mbonilla.guti@gmail.com",
subject: 'HTML Dynamic Template',
- template: 'confirmation',
+ template: 'templateEmail',
context: {
name: user["name"],
- url,
+ url
},
+ attachments: [
+ {
+ filename: 'email.png',
+ path: __dirname +'/mails/images/email.png',
+ cid: 'logo' //my mistake was putting "cid:logo@cid" here!
+ }
+ ]
});
return response;
}
diff --git a/servicio-notificaciones/src/mails/images/email.png b/servicio-notificaciones/src/mails/images/email.png
new file mode 100644
index 00000000..a8b4a74e
Binary files /dev/null and b/servicio-notificaciones/src/mails/images/email.png differ
diff --git a/servicio-notificaciones/src/mails/templateEmail.hbs b/servicio-notificaciones/src/mails/templateEmail.hbs
new file mode 100644
index 00000000..bd29756a
--- /dev/null
+++ b/servicio-notificaciones/src/mails/templateEmail.hbs
@@ -0,0 +1,452 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+
+ Hi, {{ name }}
+ Please verify your email
+ Amazing deals, updates, interesting news right in your inbox
+ Yes! Subscribe Me
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
+ No longer want to receive these email? You can Unsubscribe here
+ |
+
+
+
+
+
+
+
+
\ No newline at end of file