Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problem Sending mail with Indy 9

Posted on 2002-05-25
4
Medium Priority
?
1,408 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 400 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 400 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

604 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