|
-
Nov 29th, 2007, 06:23 AM
#1
Thread Starter
Addicted Member
Send/Receive Email SMTP/POP3 authentication
Hi,
How can i send Email using MsWinSck.ocx + authentication(SMTP/POP3).
Regards .
-
Nov 29th, 2007, 02:07 PM
#2
Fanatic Member
Re: Send/Receive Email SMTP/POP3 authentication
To send/receive mail using Winsock, you will need to study the SMTP and POP protocols. I have a list of some of the POP commands, but this list is nowhere near complete, as I lost the complete list years ago, when I used to visit these forums frequently, shortly after JupiterMedia took this site over.
SEND command will send the message, as the command name indicates.
RETR command retrieves E-mail messages. You can use this in a For/Next or Do (or Do While or Do Until)/Next loop to retrieve each message. This command must be followed by a numerical identifier. (Example: RETR 1 to retrieve the first message)
LIST command determines how many messages we have in our inbox, and the total number of bytes they're using on the server. You can store the number of messages (the first number) in a variable called numMessages, and the number of bytes being used (the second number) in a variable called totalBytes. Make sure totalBytes is a long variable, as Integers can only handle numbers between 1 and 32767, and the use of an Integer type will result in a type mismatch if numBytes goes beyond this boundary. (I'm going off memory here, someone correct me if this is inaccurate.)
QUIT command leaves the server.
DELE command sends a delete message to the server. This must be followed by a numeric identifier for the message ID. (Example: DELE 2 to delete the second message in the inbox)
That's all I can remember offhand. To use them, I believe you can use the commands in the Winsock.SendData function, and the server should respond, but I could be wrong on that, as I'm not exactly sure on how mail servers work.
Last edited by hothead; Nov 29th, 2007 at 02:12 PM.
-
Nov 30th, 2007, 12:26 PM
#3
Thread Starter
Addicted Member
Re: Send/Receive Email SMTP/POP3 authentication
What?!
-
Dec 3rd, 2007, 08:18 AM
#4
Fanatic Member
Re: Send/Receive Email SMTP/POP3 authentication
Go here. This is how I first learned how to use POP mail. It's an exercise that uses Telnet to log into a POP mail server. Telnet is included in Windows, all you have to do is go to start/run, then type "telnet *your mailserver address* 110" (port 110 is the port the POP protocol uses.)
http://www.yuki-onna.co.uk/email/pop.html
Also there are many examples on PlanetSourceCode that use the POP and SMTP protocols, their source code is freely available, you could check that out. And finally, there's a FreePOP OCX control that I believe can be distributed freely, you might also search Google for the FreePOP control.
Last edited by hothead; Dec 3rd, 2007 at 08:25 AM.
-
Dec 3rd, 2007, 08:56 AM
#5
Thread Starter
Addicted Member
Re: Send/Receive Email SMTP/POP3 authentication
Tnx . How can i send Email SMTP to anybody using my domain(www.YPY.ir)?
Regards.
-
Dec 4th, 2007, 02:05 PM
#6
Fanatic Member
Re: Send/Receive Email SMTP/POP3 authentication
I don't know about that. You're going to have to do a Google Search on that. I'd do it for you right now, but I'm at work right now.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|