Solved

Receiving mail message line by line using Tclient Socket

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now