any email examples out there - Search couldn't help me !!

Started by vanjast, February 27, 2012, 06:42:38 PM

Previous topic - Next topic

vanjast

I'd like to write a simple email module that sends/reads an email, without the need to go through any email programs or registered email dlls.
I think there was an email example posted sometime ago - just cannot find it...

Here's my thoughts..
- Know the structure of the email sent over the net, the ports, and packet formats.
- Be able to parse/filter emails on one's postbox and download the relevant email.

Thanks for any help
:8)







Gunner

Not at computer but you can search for rfc's smtp rfc, mime rfc email is easy
~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com

vanjast


clive

Probably POP on the receive side
http://tools.ietf.org/html/rfc1081

Both SMTP (25) and POP (110) are relatively simple back-n-forth protocols using sockets, personally haven't coded them in assembler, but have done so in C.

Gets more complicated if you want it secure. I haven't looked at IMAP
It could be a random act of randomness. Those happen a lot as well.


oex

We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv

Tedd

Sending is simple, as long as you have a friendly server - use ESMTP http://tools.ietf.org/html/rfc5321 via port 25, and then the commands of interest will be "EHLO", "MAIL FROM", "RCPT TO", "DATA", and "QUIT"

Receiving can be a bit more complex, but POP3 http://tools.ietf.org/html/rfc1939 is fairly simple; though IMAP4 http://tools.ietf.org/html/rfc3501 is preferred, but requires more work.

They're purely line-based text protocols, where lines end with a CR-LF pair. You connect on the required port, start sending commands, and receive the replies. Anything that isn't plain text (attachments) tends to be MIME encoded.
No snowflake in an avalanche feels responsible.

vanjast