Have application send an email using MQX RTCS?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Have application send an email using MQX RTCS?

Jump to solution
1,002 Views
Tim562
Senior Contributor I

Hi All,

     I would like to enable my application to issue an email alert and am wondering what is required to do it. I see that SNMP support (v1 and v2) is part of RTCS but looking at the example project I see a lot of stuff I'm not familiar with. Would I need all the functionality created with the example project just to send an email? I'm not trying to create a full client that can send and receive, I just want to send. Any suggestions? I'm using the MPC-5125 with MQX 3.8.1.1 patched with RTCS 4.0.2. Current project is using TCP/UDP sockets and the http server and all is working great. Thanks!

Best,

Tim

Tags (2)
0 Kudos
Reply
1 Solution
687 Views
RadekS
NXP Employee
NXP Employee

Please look at shell example for send email. Default path:

c:\Freescale\Freescale_MQX_4_0\shell\source\rtcs\sh_smtp.c

I guess that it is exactly what you are looking for.


Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
4 Replies
688 Views
RadekS
NXP Employee
NXP Employee

Please look at shell example for send email. Default path:

c:\Freescale\Freescale_MQX_4_0\shell\source\rtcs\sh_smtp.c

I guess that it is exactly what you are looking for.


Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
687 Views
Tim562
Senior Contributor I

Hi Radek,

My application wasn't able to find the SMTP_send_email() function called to actually do the work. I tried adding "{MQX_PATH}rtcs\source\apps" to my project (this is where rtcs_smtp.c lives) with no luck. Next I opened the RTCS project and saw that rtcs_smtp.c wasn't included in that project. I added it and rebuilt MQX and now I'm able to call SMTP_send_email() as I need. My question is, was this the right thing to do? Maybe there is an options #define I could add to user_config.h to cause SMTP support to be included? Thanks again for your tip, I appreciate.

Best,

Tim

0 Kudos
Reply
687 Views
RadekS
NXP Employee
NXP Employee

Unfortunately I am not sure what caused it.

In standard MQX release (MQX 4.0.2), rtcs_smtp.c is part of RTCS library.

I guess that it could be somehow related to your patch (MQX 3.8.1.1 patched with RTCS 4.0.2). SMTP_send_email() function was newly added in version MQX 4.0.2.

0 Kudos
Reply
687 Views
Tim562
Senior Contributor I

Morning Radek,

         That looks like exactly what I needed. Thanks very much for your reply!

Best,

Tim

0 Kudos
Reply