# Error when using ed\_SendMail()

**URL:** <https://forum.sierrawireless.com/t/error-when-using-ed-sendmail/83>\
**Category:** Open AT\
**Created:** [October 20, 2005, 5:33pm UTC](https://forum.sierrawireless.com/t/error-when-using-ed-sendmail/83 "2005-10-20T17:33:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiten9](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jiten9](https://forum.sierrawireless.com/u/jiten9)\
**Post date:** [October 20, 2005, 5:33pm UTC](https://forum.sierrawireless.com/t/error-when-using-ed-sendmail/83/1 "2005-10-20T17:33:48Z")

</div>

Hello all,

I have a strange problem; when sending an email with ed\_SendMail() function the responseCbk function gives -32 error which is ED\_ERR\_DISTANT\_DNS which is explained as:

“Remote server name has not been mapped by DNS. TCP/IP stack is not able to reach the primary and secondary DNS servers or a wrong server address has been filled in”

Does anyone come across such error ?

When I start the wismo normally the function works fine but after long working and stress email sending this error pops up ??

Any ideas ???

Thanks,  
Jiten.

---

<div class="post-metadata">

**Author:** ![OpenAT\_Fan](https://avatars.discourse-cdn.com/v4/letter/o/f07891/32.png) [@OpenAT\_Fan](https://forum.sierrawireless.com/u/OpenAT_Fan)\
**Post date:** [November 16, 2005, 2:07pm UTC](https://forum.sierrawireless.com/t/error-when-using-ed-sendmail/83/2 "2005-11-16T14:07:09Z")

</div>

The error ED\_ERR\_DISTANT\_DNS (-32) comes in the mail callback handler when eDlib is not able to contact the DNS server to resolve the name of the smtp server. This might occur if the DNS server is too busy and cannot reply withing the timeout period. Also in case, the module is having a weak signal strength when it tries to send the UDP packet (to contact the DNS server- Please note that DNS server is contacted using UDP datagrams), the UDP packet will not arrive in time. In this case too, the UDP socket will timeout and error -32 (ED\_ERR\_DISTANT\_DNS) will occur.
