digi connect me 9210

I have problems in sending emails with Digi Connect ME 9210 device with the development board.
I’m using the connect ME 9210 email service sample provided inside the NetOs 7.5 distribution to understand the mail behaviour.

The problem is that I’m not able to send emails with any of the functions provided in the example (test_email_simple_send(), test_email_smtp_authentication(), etc.).

The errors that arose are, for example:
ERROR: MCGetSmtpAuthentication fails and returns -4, or
ERROR: MCUserLogin fails to login with ----- username & — password - eRmMsgAbortTcpError, or
ERROR: MCSendMail returns eRmMsgAbortTcpError (-6),
simple_send_callback on 0x21AA30 handle
user data: mail example 4
status: eRmMsgAbortTcpError (-6).

I have tried with gmail and aruba accounts but I have always obtained errors.

Is there any way to solve such problem and to send an email with attachments?

I would be grateful if someone could give me some support about that.

Thank you

First, MCGetSmtpAuthentication error -4 is NAMAILC_NOSERVER.

To figure that out, you look up MCGetSmtpAuthentication in the ApiReference. Then you look in the “See also” section for links to explain the error codes which is “Mail Client API Return Status.” That takes you to the list of possible return code names. Sadly the docs don’t provide the actual integer value. So, next, you look up the Include file section which identifies “mailcapi.h” as the include file. Since there are a gazillion files with NETOS, open the /netos75 folder and use your desktop search to find that file. After a while, you start to understand the organization and start to get a hunch where to look to start with.

OK, so -4 == NAMAILC_NOSERVER which to me means that you haven’t defined an SMTP server for the mail system to use, or NETOS can’t talk to the server you did define – the IP address is wrong, the server itself is off, etc. Also, you’ll need to know the type of authentication your SMTP server allows. If that’s not correct, you won’t get far either.

You need to understand the steps leading up to the NAMAILC_NOSERVER error before the rest of what you see is even worth looking into. IOW, the failed login is a side effect of their not being a valid server connection in the first place. So, I wouldn’t even try to chase that yet.

Personally, I find most of the code samples to be convoluted and time consuming to separate the “overhead” from the actual demonstration, but keep studying and looking up everything you can in the ApiReference. My technique now is instead of reading the sample code and trying to understand it top to bottom, I read the API docs for the “do this then that” information and look through the code for details of using specific functions. I find that helps me understand the key steps first, then I can read the sample app for setup details which may be relevant to my app.

– gw

I can not speak for aruba but I can for gmail. Gmail requires encrypted messages. NOT+OS does not support encrypted messages so you will not be able to attach to gmail. It is very possible that you are running into the same issue with aruba.