Function to send email

 const sendEmail = (author, recepinetsEmail, subject, body, relatedRecords) => {

            try {

                email.send({

                    author: author,

                    recipients: recepinetsEmail,

                    subject: subject,

                    body: body,

                    relatedRecords: relatedRecords

                });

                return true

            } catch (e) {

                log.error(“Error in sendEmail”, e);

                return false

            }

        }

Leave a comment

Your email address will not be published. Required fields are marked *