# Email notification fails

**URL:** <https://forum.duplicati.com/t/email-notification-fails/6323>\
**Category:** Uncategorized\
**Created:** [February 12, 2019, 11:19am UTC](https://forum.duplicati.com/t/email-notification-fails/6323 "2019-02-12T11:19:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Foiler](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/f/a9adbd/32.png) [@Foiler](https://forum.duplicati.com/u/Foiler)\
**Post date:** [February 12, 2019, 11:19am UTC](https://forum.duplicati.com/t/email-notification-fails/6323/1 "2019-02-12T11:19:12Z")

</div>

In the Log I get Failed to send message: etc  
“NativeErrorCode”:10051 etc

The odd thing is that the setup works fine on a different internet connection. But using Sendemail to test the email settings, that testing works fine.

This is doing my head in … I have about 10 sites which are working fine, but the most recent 3 installs I have done all have the above problem.

Hoping someone can help.

---

<div class="post-metadata">

**Author:** ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)\
**Post date:** [February 13, 2019, 12:08am UTC](https://forum.duplicati.com/t/email-notification-fails/6323/2 "2019-02-13T00:08:33Z")

</div>

> [@Foiler](#):
>
> Hoping someone can help.

Posting more complete error messages can increase the chance. Fortunately I found a [possible example](https://forum.duplicati.com/t/email-problem-and-backup-lock/3841/8):

```plaintext
Jun 25, 2018 9:30 AM: Failed to send message: System.Net.Sockets.SocketException: A socket operation was attempted to an unreachable network 8.8.8.8:53
{
"NativeErrorCode":10051,
"ClassName":"System.Net.Sockets.SocketException",
"Message":"A socket operation was attempted to an unreachable network",

```

If that’s like what you saw, then [WSAENETUNREACH (10051) Network is unreachable.](http://www.sockets.com/err_lst1.htm#WSAENETUNREACH) may explain it as something in the network reporting it couldn’t get to the server. Possibly your different connections take a different path to the server. You could run the tracert or traceroute command to see what route it’s taking.

You can also see if you’re getting additional [Destination unreachable](https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol#Destination_unreachable) messages when you get that 10051:

```plaintext
C:\>netstat /s | find "Unreachable"
  Destination Unreachable 105612 709679
  Destination Unreachable 17678 23553

C:\>

```

Though it’s a rather advanced technique, [Wireshark](https://www.wireshark.org/) could give an even better view of packets and errors.

The “different internet connection” isn’t real clear, but I’m assuming it refers to a different site and network. Are there commonalities among the working network connections, and differences from those that failed?

---

<div class="post-metadata">

**Author:** ![Foiler](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/f/a9adbd/32.png) [@Foiler](https://forum.duplicati.com/u/Foiler)\
**Post date:** [February 13, 2019, 2:15am UTC](https://forum.duplicati.com/t/email-notification-fails/6323/3 "2019-02-13T02:15:12Z")

</div>

THANK YOU !!! This was really useful information and I have now solved the problem.

I had specified this email URL which interestingly does work on most systems (using Draytek routers) …  
–[send-mail-url=smtp.gmail.com/?starttls=always](http://send-mail-url=smtp.gmail.com/?starttls=always)

Changed this to the following, and this now works on the recent systems (using Huawei routers) …  
–send-mail-url=smtp://smtp.gmail.com:587/?starttls=always
