simple SMTP-client for embedded linux application

Hello, All!

We are building embedded linux system, and we need to add some SMTP function - smtp-client. Could you please recommend something very simple, that can be further modified for adding new features etc. I guess, sendmail/postfix/qmail are not supposed to be included in embedded environment.

Thank you for any help!

With best regards, Roman Mashak. E-mail: snipped-for-privacy@tusur.ru

Reply to
Roman Mashak
Loading thread data ...

Do you mean CLIENT (send mail) or SERVER (receive inbound SMTP connections)? The simplest possible client is a function of about a dozen lines of C code that opens a connection to port 25 of the target SMTP server, and sends: MAIL FROM snipped-for-privacy@place.net, RCPT TO snipped-for-privacy@place2.net, etc!

Reply to
Lewin A.R.W. Edwards

Hello, Lewin! You wrote on 7 May 2004 04:18:58 -0700:

LAW> Do you mean CLIENT (send mail) or SERVER (receive inbound SMTP LAW> connections)? The simplest possible client is a function of about a I need CLIENT, so it could be able to send mail outside of embedded system. LAW> dozen lines of C code that opens a connection to port 25 of the target LAW> SMTP server, and sends: MAIL FROM snipped-for-privacy@place.net, RCPT TO LAW> snipped-for-privacy@place2.net, etc! Yes, you understodd me correctly! So, I asked this question in order someone pointed me some very simple source code with above mentioned functions (MAIL_FROM, RCPT_TO etc.). Cause I would not like to grep in sendmail/postfix code :) Could you? I'd appreciate highly!

With best regards, Roman Mashak. E-mail: snipped-for-privacy@tusur.ru

Reply to
Roman Mashak

I think way easier to implement this kind of client would be to read the RFC in question. Once you understand the SMPT protocoll (which is really very simple) implementing this code on your own is a matter of half a day or so. Understanding and porting someone elses code is maybe half a day or so... :-)

formatting link

Jeremy Bentham's TCP/IP lean also contains a little charpter on the subject, but I doubt that this otherwise excellent book is worth it to buy for this purpose only.

Markus

Reply to
Markus Zingg

Honestly, I haven't written one. I just know how I would go about it, and I know that a minimal, non-RFC-compliant implementation (practically no error checking, for instance) would be about a dozen lines of C.

Reply to
Lewin A.R.W. Edwards

CodeProject.com has several SMTP client implementation. Just visit their website and type SMTP in the search box.

The implementations are for Windows but they can be easily customized to run on Linux.

Sandeep

--

formatting link
EventStudio 2.0 - Real-time and Embedded System Design CASE Tool

Reply to
EventHelix.com

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.