Solved

Problem Sending mail with Indy 9

Posted on 2002-05-25
4
1,379 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
[X]
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
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

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

729 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