Solved

Problem Sending mail with Indy 9

Posted on 2002-05-25
4
1,365 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

863 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

20 Experts available now in Live!

Get 1:1 Help Now