# email with ssl not working

**URL:** <https://forums.digi.com/t/email-with-ssl-not-working/14156>\
**Category:** Rabbit Software\
**Tags:** smtp, rcm4000\
**Created:** [January 8, 2015, 10:47am UTC](https://forums.digi.com/t/email-with-ssl-not-working/14156 "2015-01-08T10:47:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kenneth43](https://avatars.discourse-cdn.com/v4/letter/k/3bc359/32.png) [@Kenneth43](https://forums.digi.com/u/Kenneth43)\
**Post date:** [January 8, 2015, 10:47am UTC](https://forums.digi.com/t/email-with-ssl-not-working/14156/1 "2015-01-08T10:47:57Z")

</div>

I’m trying to send with RCM4000 and smtp\_tls.c  
The verbose printout is:

# IP addr. Mask Up Lnk Type MTU Flags Peer/router

* * *

0 217.208.53.33 255.255.255.128 yes yes eth 1500 \*DD 217.208.53.1  
Setting authentication parameters…  
Sending mail to [another@telia.com](mailto:another@telia.com) via [mailout.telia.com](http://mailout.telia.com)  
to:1729  
from:173b  
subject:1719  
message:171F  
SMTP: Resolving [mailout.telia.com](http://mailout.telia.com)  
TCP: 337ms since last call to tcp\_tick!  
SMTP: Opening to 3E14E982:1d1  
SMTP: Connected  
SMTP: Timed out  
Error sending message

Why the long time since last tic?  
When connected there must have been some conversation with [mailout.telia.com](http://mailout.telia.com)?  
There is a pop3 [mailin.telia.com](http://mailin.telia.com) for email coming to me. This is not entered anywhere. Not needed to send email ?

---

<div class="post-metadata">

**Author:** ![trooper2](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@trooper2](https://forums.digi.com/u/trooper2)\
**Post date:** [January 8, 2015, 11:26am UTC](https://forums.digi.com/t/email-with-ssl-not-working/14156/2 "2015-01-08T11:26:34Z")

</div>

I would check the return value from smtp\_status() to find out why you are getting the “Error sending message” statement.

You were able to connect so I don’t think there is anything wrong with the socket at that point.

---

<div class="post-metadata">

**Author:** ![Kenneth43](https://avatars.discourse-cdn.com/v4/letter/k/3bc359/32.png) [@Kenneth43](https://forums.digi.com/u/Kenneth43)\
**Post date:** [January 8, 2015, 3:03pm UTC](https://forums.digi.com/t/email-with-ssl-not-working/14156/3 "2015-01-08T15:03:56Z")

</div>

the return value from smtp\_status() is -438, that is SMTP\_TIME error.  
After some changes, allowing uncoded message and nonmatching name in certificate, the return code was -439, SMTP\_UNEXPECTED.  
After trying with a certificate generated with the utility “certificate.exe”, still no success. The end of the Stdio output is:  
SMTP: Resolving [mailout.telia.com](http://mailout.telia.com)  
TCP: 279ms since last call to tcp\_tick!  
SMTP: Opening to 3E14E982:1d1  
SMTP: Connected  
TCP: 1061ms since last call to tcp\_tick!  
SMTP: Read: char(21),char(3)  
SMTP: Read:  
SMTP: Read: char(2),char(2),(  
Error sending message, rc=-439

After this I changed the port from 465, given for SSL by Telia to 587, not mentioned by Telia and it w o r k s !  
Thanks!
