Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.

ADR #14: Email with order resume

Pablo Lopez edited this page Apr 22, 2022 · 3 revisions

Email with order resume

Status

Accepted

Context

We wanted to send an email to the user after an order was created with the order information.

Decision

We implement it using a node module called html-pdf, which allowed us to create a pdf from a html file (that was created dynamically) and then send it to the user.

Consequences

This approach was working on develop mode but when sending to production there was an error with the phantomjs on the docker container that wasn't allowing the module to work, so we had to change our approach.

Then we tried creating a PDF dynamically, mostly the same way than before but storing it and afterwards sending it but we weren't capable of taking an exisiting file and attach it to the email so we had to deprecate that option too.

Finally, as it isn't a requierement we send the email and at the end of it, the order resume in plain html is shown, therefore the user gets the information of the order as we wanted, eventhough is not the best approach, the final goal is met

Clone this wiki locally