There are some cases that you need to communicate with your users through email. Silvie comes with a helper function to
send emails as easy as possible. This helper uses the nodemailer package to
create the mail transporter and send emails from your application. All you need to do is to configure your SMTP server
and email account credentials in the mail configuration file and import the helper function
sendMail() function will take the email data, the receiver and the sender information. This function returns
nothing, but you may get error messages in the console as if anything goes wrong.
aliasName will be shown as the name of the sender in the receiver inbox, set it to
null if you don't want this
to parameter is the receiver email address.
htmlBody is optional, but you can send an HTML email body by passing a string with HTML contents to this
parameter. It is recommended to send both
HTML versions of an email in case a client does not support HTML
content in email, or HTML content has been disabled for some reason.