# SMTP Error "Connection closed unexpectedly" with Gmail on n8n Cloud (Works perfectly in GMass)

**URL:** <https://community.n8n.io/t/smtp-error-connection-closed-unexpectedly-with-gmail-on-n8n-cloud-works-perfectly-in-gmass/244197>\
**Category:** Questions\
**Tags:** smtp, send-email\
**Created:** [January 2, 2026, 9:26am UTC](https://community.n8n.io/t/smtp-error-connection-closed-unexpectedly-with-gmail-on-n8n-cloud-works-perfectly-in-gmass/244197 "2026-01-02T09:26:44Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![eric-burel](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/eric-burel/32/116641_2.png) [@eric-burel](https://community.n8n.io/u/eric-burel)\
**Post date:** [February 23, 2026, 10:35am UTC](https://community.n8n.io/t/smtp-error-connection-closed-unexpectedly-with-gmail-on-n8n-cloud-works-perfectly-in-gmass/244197/3 "2026-02-23T10:35:22Z")

</div>

Hi, same issue here, additionally I’ve tested removing the whitespaces into the app password as I don’t know if they are relevant or not. The error message is quite vague.

Using the dedicated Gmail node is irrelevant as it requires a convoluted oauth2 setup and SMTP should work out-of-the-box.

This is perhaps some security measure from Google?

Related: [Connection closed unexpectedly error during sending email via Send Email node with gmail credentials](http://community.n8n.io/t/connection-closed-unexpectedly-error-during-sending-email-via-send-email-node-with-gmail-credentials/62330)

---

_[View the full topic](https://community.n8n.io/t/smtp-error-connection-closed-unexpectedly-with-gmail-on-n8n-cloud-works-perfectly-in-gmass/244197)._
