---
title: "Comment by Darys Raso on \"How to Build a Contact Form with JavaScript and NodeMailer\" | Hashnode"
description: "Hello, first of all thanks a lot for sharing this to us! I am pretty new using servers in js, especially using express, could you help me out managing what to d"
url: "https://hashnode.com/posts/how-to-build-a-contact-form-with-javascript-and-nodemailer/5f3d05e179fdf532228edc72/comment/5ffbf15aaa5c467fe155a418"
---

[Discussion](https://hashnode.com/posts/how-to-build-a-contact-form-with-javascript-and-nodemailer/5f3d05e179fdf532228edc72)

Comment [How to Build a Contact Form with JavaScript and NodeMailer](https://hashnode.com/posts/how-to-build-a-contact-form-with-javascript-and-nodemailer/5f3d05e179fdf532228edc72)

[Darys Raso](https://hashnode.com/@Darys)

[Jan 11, 2021](https://hashnode.com/posts/how-to-build-a-contact-form-with-javascript-and-nodemailer/5f3d05e179fdf532228edc72/comment/5ffbf15aaa5c467fe155a418)

Hello, first of all thanks a lot for sharing this to us!

I am pretty new using servers in js, especially using express, could you help me out managing what to display after the mail has been sent, I would like to keep my form page but only changing the button style instead of going to the blank page with "Email successfully sent to recipient!" but I can't figure out how to, please help me if you have time to

[Victoria Lo](https://hashnode.com/@victoria)

[Jan 11, 2021](https://hashnode.com/posts/how-to-build-a-contact-form-with-javascript-and-nodemailer/5f3d05e179fdf532228edc72/comment/5ffbf15aaa5c467fe155a418#reply-5ffbf868aa5c467fe155a4e7)

Hi Darys! Thanks for reading!

Instead of:

```
res.status(200).send("Email successfully sent to recipient!")
```

Replace with:

```
res.status(200).json({status: 'success'})
```

And it will not go to a blank page.

[Darys Raso](https://hashnode.com/@Darys)

[Jan 13, 2021](https://hashnode.com/posts/how-to-build-a-contact-form-with-javascript-and-nodemailer/5f3d05e179fdf532228edc72/comment/5ffbf15aaa5c467fe155a418#reply-5ffe47b1b00f7510ee958944)

Thank you so much ! You actually did save me
