Solved

Problem Sending mail with Indy 9

Posted on 2002-05-25
4
1,358 Views
Last Modified: 2012-06-21
I use delphi 6 and Indy 9 Tidsmtp
When I try to send a e-mail I get this error.

Project Mail.exe raised exception class EIdProtocolReplyError with message 'valid RCPT command must precede DATA'.

What can be wrong
0
Comment
Question by:delpro
4 Comments
 
LVL 12

Accepted Solution

by:
Lee_Nover earned 100 total points
ID: 7034419
hum ... never had this problem
how do you send themessage ?
this is a part from one of my dlls :

function SendEmail(const Server: PChar; const Port: Integer = 25): Integer; stdcall;
var idSMTP: TidSMTP;
begin
     Result:=-1;
     if not Loaded then exit;
     try
        idSMTP:=TidSMTP.Create(nil);
        try
           idSMTP.Host:=string(Server);
           idSMTP.Port:=Port;
           idSMTP.Connect();
           if not idSMTP.Connected then exit;
           idSMTP.Send(idMSG); // idMSG is a global TidMessage
           Result:=1;
        finally
           if idSMTP.Connected then
              idSMTP.Disconnect;
           FreeAndNil(idSMTP);
        end;
     except
        Result:=-2;
     end;
end;
0
 
LVL 14

Assisted Solution

by:AvonWyss
AvonWyss earned 100 total points
ID: 7035110
The host where you are trying to send the message to has not received, recognized, or accepted the RECV command which must be issued prior to sending data. The cause for this can be no recipient address, a bad recipient address, or no right to relay on that server.
0
 

Author Comment

by:delpro
ID: 7038788
The same settings work in NMSMTP
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9006823
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Split between Lee_Nover and AvonWyss

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 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

23 Experts available now in Live!

Get 1:1 Help Now