Solved

Receiving mail message line by line using Tclient Socket

Posted on 2004-08-02
3
131 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 100 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

756 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