简体   繁体   中英

How to write HTML and CSS code in Node js to Send Eamils to Users

I want to send Emails using node-cron and wanted to style the message. Basically, I wanted to send user a list of things as attached below. I wanted to write something like this

   <table id="schedule">
      <tr>
        <th>Centre Name</th>
        <th>Vaccine</th>
        <th>Address</th>
        <th>PinCode</th>
        <th>Date</th>
        <th>Fee Type</th>
        </tr>
   </table>

And I wanted to style these elements of the table. When I tried to write CSS code in Nodejs it showed an error. How can I do that in node js.

在此处输入图像描述

return `
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td align="center" valign="top" bgcolor="#f6f6f8" style="background-color:#eeeeee;">
                Some avesome things here
            </td>
        </tr>
    </table>
`

Like this

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM