To connect email server and send email

1.Initialize winsock dll
2.Create socket
3.Specify the operation mode: blocking or non-blocking
4.Connect the socket

And then what kinda data should I send to that email server ?

And is port number only difference bitween different kinda server ?

Trying to make simple mail sender but some part needed help...
Posted on 2002-05-12 09:30:46 by Gandalf
Look up the SMTP rfc wich will explain the email protocol
Posted on 2002-05-12 09:49:57 by Kudos

Look at this thread. You should find an attached
file I submitted with some code I ripped out of a
program I use to send email attachments. Let me
know if it helps, or if you have any problems.

I found this using the search button, found on
almost every screen here!


Posted on 2002-05-12 11:01:57 by farrier
I read ur source code and now I understand pretty much

By the way isn't there specified port for SMTP ?

I have one more question ....
How can I know what server to use for SMTP for example if I wanna use yahoo, can i just connect and send email through their server ?

And I wrote very simple client and server program b4 write email sender... but it doesnt work quite as I expected ...

I attached the source can anyone tell me what's wrong ?

(It's simple program server.exe waits on port 2027 for incoming connect and client try to connect server... And if success client show messagebox with sucess and if fail it shows "sucks" ...
I tried to debug and i don't think loading wsock dll or socket function has problem... i guess something about listening and connect has problem.... Well anyone tell me what's wrong...)
Posted on 2002-05-12 11:56:01 by Gandalf
standard SMTP port is 25 (I believe this is in the RFC...)
As for SMTP server to use, give the user an option to set it.
You can't use yahoo, they recently stopped their free SMTP/POP3
access :(.
Posted on 2002-05-12 12:07:46 by f0dder

As f0dder said, and my code implemented, the
standard SMTP port is 25. Never tried any others.

As for a server, I have always used the server
the user normally uses for email. I have the user
check the setup information in their email client.

Posted on 2002-05-12 15:17:32 by farrier
most ISPs if not all, have an smtp server for their customers to use (usually named check on your isp's website for the address of their smtp server or contact them about it.
Posted on 2002-05-12 21:12:28 by clip