Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Receiving mail message line by line using Tclient Socket

Posted on 2004-08-02
3
Medium Priority
?
148 Views
Last Modified: 2010-04-05
Hi

My question is the same as in title.
The problem is that i can connect to my mailbox ('+OK POP3 ready') but mail server doesn't accept and respond with '+OK' why I'm sending command 'user someuser' .
Any ideas.

My example:
(...)

var
s:string[30];
p:pchar;

begin
        s:='user someuser'#0;
        p:= @S[1];
        ClientSocket.Socket.SendBuf(p,length(p));


Thank you in advance.
0
Comment
Question by:Murdoc
  • 2
3 Comments
 

Author Comment

by:Murdoc
ID: 11702103
No answer so i will increase pints to 100. Hope i t will help :)
0
 
LVL 8

Accepted Solution

by:
gmayo earned 400 total points
ID: 11702145
I think you may be missing some protocol characters... the mail server needs to know where each message begins and ends, as sockets are raw data. For example if you send "Hello world" followed by "Goodbye" the text received at the other end would be "Hello worldGoodbye". A quick Google suggests that each command should be followed by CRLF but there may be more to it than that.

http://www.faqs.org/rfcs/rfc1939.html

Example:
s:='user someuser'#13#10#0;

Geoff M.
0
 

Author Comment

by:Murdoc
ID: 11702933
Hi

You we're right qmayo. Really thanks for your help.

It suppose to be:      s:='user someuseri'#13#10;

Regards.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question