NodeJS & Nodemailer: weird html context

hey there. I’m building my portfolio and adding a contact form. I’m using nodemailer which can send my emails after users submit a contact form. But the HTML that I receive is different from my design.
My backend
My email screenshot
image

I checked the HTML of my Gmail inbox, I got
image
Apparently, there are two extra list elements. I don’t know where they came from. Could anyone help me??
Thank you!

Hmm… That’s strange. I can’t help but think somewhere where you are sending the mail, it’s sending with <li>s attached? Do you have a github for this where I can see all of the code to maybe pinpoint it better?

Thank you!XXXXXXXXXXXXXXXXXXD

Oh my god. I don’t know why I didn’t notice it in your screenshot but as soon as I put it on VS Code, I saw that you didn’t close your li’s.

So just change it to include closing tags…
<li>${req.body.name}</li>
<li>${req.body.email}</li>

Isn’t that funny. I totally understand how often trivial mistakes like this come about though. :laughing:

1 Like

Thank you! LOL. I didn’t notice it. :rofl:

No problem! It’s really much better to get another set of eyes, so you are smart to come here! I’ve spent hours before just trying to resolve a simple mistake like that! :rofl:

1 Like