Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Problem Sending mail with Indy 9

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

837 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