# Net::ReadTimeout when sending email after install

**URL:** https://meta.discourse.org/t/net-readtimeout-when-sending-email-after-install/56856
**Category:** Self-hosting
**Created:** [3 februari 2017 om 10:23 UTC](https://meta.discourse.org/t/net-readtimeout-when-sending-email-after-install/56856 "2017-02-03T10:23:21Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![gpson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gpson/32/120877_2.png) [@gpson](https://meta.discourse.org/u/gpson)
#### Post date: [3 februari 2017 om 10:23 UTC](https://meta.discourse.org/t/net-readtimeout-when-sending-email-after-install/56856/1 "2017-02-03T10:23:21Z")

</div>

## The Problem

I get the error on first registration:

```plaintext
tail -f /var/discourse/shared/standalone/log/rails/production.log
Sent mail to robotas@magveda.lt (61113.9ms)
Job exception: Net::ReadTimeout

```

## What I tried

- I received the test email successfully using python code provided in [Troubleshoot email on a new Discourse install - #113](https://meta.discourse.org/t/troubleshooting-email-on-a-new-discourse-install/16326/113)

- I checked all options in [Troubleshoot email on a new Discourse install - #113](https://meta.discourse.org/t/troubleshooting-email-on-a-new-discourse-install/16326/113) without success

- Tried different email accounts, then `./launcher rebuild app` and I get the same error

## The question

- What more can I do?
- Is it possible to increase the verbosity of the error?

## My ` containers/app.yml` :

```plaintext
  ## TODO: List of comma delimited emails that will be made admin and developer
  ## on initial signup example 'user1@example.com,user2@example.com'
  DISCOURSE_DEVELOPER_EMAILS: 'robo@magved.lt'

  ## TODO: The SMTP mail server used to validate new accounts and send notifications
  DISCOURSE_SMTP_ADDRESS: pap.serveriai.lt
  DISCOURSE_SMTP_PORT: 465
  DISCOURSE_SMTP_USER_NAME: robo@magved.lt
  DISCOURSE_SMTP_PASSWORD: topsecret
  DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
  DISCOURSE_SMTP_AUTHENTICATION: plain
  #DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none

```

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [3 februari 2017 om 11:43 UTC](https://meta.discourse.org/t/net-readtimeout-when-sending-email-after-install/56856/2 "2017-02-03T11:43:25Z")

</div>

Can you manually (via `telnet` or similar) send an email from the server using the **same** credentials?

---

<div class="post-metadata">

### Author: ![gpson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gpson/32/120877_2.png) [@gpson](https://meta.discourse.org/u/gpson)
#### Post date: [3 februari 2017 om 14:17 UTC](https://meta.discourse.org/t/net-readtimeout-when-sending-email-after-install/56856/3 "2017-02-03T14:17:38Z")

</div>

It is working with these parameters (PORT - 587, AUTHENTICATION - “login”):

```plaintext
  ## TODO: The SMTP mail server used to validate new accounts and send notifications
  DISCOURSE_SMTP_ADDRESS: pap.serveriai.lt
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: robo@magved.lt
  DISCOURSE_SMTP_PASSWORD: topsecret
  DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
  DISCOURSE_SMTP_AUTHENTICATION: "login"
  DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none

```

Email provider gave wrong port and authentication parameters.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [3 februari 2017 om 14:23 UTC](https://meta.discourse.org/t/net-readtimeout-when-sending-email-after-install/56856/4 "2017-02-03T14:23:07Z")

</div>


