EmbeddedRelated.com
Forums

SMTP Email not working after calling http_handler()

Started by "mjm...@gmail.com [rabbit-semi]" March 19, 2016
Good day,
I have a web server application running quite successfully but now I need to add Email functionality.
As a standalone I used the example SMTP.c and that works for me.
However after including in my my web server app it fails if I call http_handler() before sending the email.

The "Resolving" resolves my smtp server then I get "error opening socket..."

Anyone with some solutions?

Thanks,
Mike

I'm using the RCM4300 and the DC 10.72A libs
Have you tried to increased the number of sockets available using the MAX_TCP_SOCKET_BUFFERS macro? Depending on the amount of RAM available it will default to either 2 or 4 and you may be running out of sockets.

Regards,
Peter
Hi Peter,

Thanks for the response.
The setting was MAX_TCP_SOCKET_BUFFERS 10.
I then increased this to 20 and now I can send emails successfully.

Thanks for the tip, I thought that "10" would be sufficient.

Regards,
Mike