I can`t send email using Indy [Edit]

I have such a exception:
+First chance exception at $7C812AFB. Exception class EIdSMTPReplyError with message 'RCPT first (#5.5.1)+
+'. Process Project1.exe (956)+
I use Indy 10 rev. 3670. C++ Builder 2009.
This exception appear on old project, but if I build a new project using Indy there is no problem. I tried to delete all components Indy and add them again to project but nothing changed. How can I change old project to work properly ?

IdMessage1->Clear();
IdMessage1->From->Name = "j.ai@ago.pl";
IdMessage1->From->Address = "j.a@ago.pl";
IdMessage1->Recipients->EMailAddresses = "j.a@ago.pl";
IdMessage1->Subject = "";

IdSMTP1->Host = "mail.ago.pl";
IdSMTP1->Password = "00000";
IdSMTP1->Username = "j.a@ago.pl";
IdSMTP1->Port = 25;

   try
   {
	 IdSMTP1->Connect();
   }
   catch ( const Exception& ) { ShowMessage("A"); return; }

   try
   {
	  if ( IdSMTP1->Connected() )
	  {
	     IdMessage1->MessageParts->Clear();

	    TIdAttachment* IdAtt = new TIdAttachmentFile( IdMessage1->MessageParts, "test.txt"  );  
	IdSMTP1->Send( IdMessage1 );

	delete IdAtt;
	IdAtt = NULL;

		
	IdSMTP1->Disconnect();

	ShowMessage("OK");
	  }
   }
   catch ( const Exception& e ) { ShowMessage("B"); return; }

Edited by: Jacek Pawel on Jun 8, 2009 10:13 AM
0
Jacek
6/8/2009 8:13:58 AM
embarcadero.cppbuilder.socket 566 articles. 0 followers. Follow

2 Replies
1299 Views

Similar Articles

[PageSpeed] 56

<Jacek Pawel> wrote in message news:125300@forums.codegear.com...

> I have such a exception:
> +First chance exception at $7C812AFB. Exception class EIdSMTPReplyError
> with message 'RCPT first (#5.5.1)'. Process Project1.exe (956)+

EIdSMTPReplyError means that the SMTP server is sending back an error 
message in reply to one of the commands that TIdSMTP issued.  It appears to 
be the RCPT TO command that it does not like.  What kind of recipient 
address(es) are you trying to send your message to?  Are you getting the 
TIdSMTP::OnRecipientFailed event fired for them?

> This exception appear on old project, but if I build a new project using
> Indy there is no problem.

Then your old project was probably using an older version of Indy that had a 
bug in it that has already been fixed in a newer version.

> How can I change old project to work properly ?

You need to find out which command the server is actually rejecting and why. 
I suggest you use an external packet sniffer, such as Wireshark, or one of 
Indy's own TIdLog... components.  You should also upgrade the old project to 
the latest Indy as well, to make sure it is running with all of the latest 
bug fixes.

> delete IdAtt;
> IdAtt = NULL;

You do not need to do that manually.  TIdMessage owns all of the items you 
put into it.  When you Clear() the message, or just the MessageParts, all of 
the existing items are freed automatically for you.

-- 
Remy Lebeau (TeamB)
0
Remy
6/8/2009 4:56:36 PM
{quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> You should also upgrade the old project to the latest Indy as well, to make sure it is running with all of the latest bug fixes.

How to do it ?
0
Jacek
6/9/2009 1:28:39 PM
Reply:

Similar Artilces:

A problem to send email using Smtp
I have a proble to send an email from asp.net I do the following code to send an email: MailMessage mail=new MailMessage(); mail.From="test@server.com"; mail.To="myemailaddress@server.com"; mail.BodyFormat=MailFormat.Html; mail.Subject="testing..."; mail.Body="cool"; SmtpMail.SmtpServer="localhost"; SmtpMail.Send(mail); But I dont' receive an email when I use this method. Why is that? How can I send an email? Thanks in advance! check and see if.. -your client-side code has no errors -you imported the S...

WindowsApplication can send email,but WebApplication can't send,and don't show error.
WindowsApplication can send email,but WebApplication can't send,and don't show error. this is code Dim strBody As String = "This is the body..." Dim OLApp As New outlook.Application() Dim msg As outlook.MailItem msg = OLApp.CreateItem(outlook.OlItemType.olMailItem) msg.To = "sbzhong@cclmotors.com" msg.Subject = "Automated e-mail" msg.Body = strBody CType(msg, outlook._MailItem).Send() ...

Can't Send Email using Verizon Email with SM. OE6 works okay.
I am trying to setup SM 1.1.11 to work with Verizon email. Reading email works but sending does not. When I try to send with SM, I get the following: "Send Message Error. Sending of message failed. The message could not be because connecting to SMTP server outgoing.verizon.net failed. ...." I am able to get the send to work in OE6 with the following settings: OE6 Outgoing port = 25 "Server requires SSL" is not checked "Outgoing Server requires authentication" IS checked Settings "Use same settings as my incoming server" IS checked ...

SM 2.0 Can't Get Email, But Can Send Email
I've just installed SeaMonkey 2.0, imported all my old data, and started the new version. I have a couple of problems/questions: 1. I can send email, but when I click on the Get Msgs/Get All New Messages menu item, nothing happens. No status messages in the footer to show any activity, and the messages I can see in my webmail account inbox are not downloaded. If I start the old version it downloads the messages just fine. 2. When I start the email app, no folder is selected, so my Inbox emails don't appear in the right pane until I select the Inbox folder. I used to...

Two things,Why do I keep getting emails that I don't want. can't get rid of them? Why can't I get my email when I am out of town? Or can I?
Name: Ed Leech Email: ELCraftatzoominternetdotnet Product: Thunderbird Summary: Two things,Why do I keep getting emails that I don't want. can't get rid of them? Why can't I get my email when I am out of town? Or can I? Comments: I am getting frusted with all the emails coming in that I do not want, I am using the tools to get thme out but they keep coming. They just use different names or whatever. I have been thinking of just switching to something else but my business intrusts know this email and it is tooo confusing to change. Every time I go out of town on bu...

Why can't I send email using client.SendAsync()
I try to send email using client.SendAsync(), but  I get the error below, why? thanks! Asynchronous operations are not allowed in this context. Page starting an asynchronous operation has to have the Async attribute set to true and an asynchronous operation can only be started on a page prior to PreRenderComplete event. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: Asynchronous oper...

Can't install Email-Send & Can't access Bugzilla in Browser
Hi All I am facing this problem for many days now and actually am stuck at this point can somebody please help me in resolving this (platform is Windows Server 2003, perl 5.8.8, Apache 2.2.4) 1) When I runchecksetup.pl command it give me error that Email Send and Emil MIME Modifier are not installed ..... I followed the instructions and run the commands but am unable to install these two C:\Bugzilla\bugzilla-3.0>ppm install Email-Send Downloading ActiveState Package Repository packlist...not modified Downloading theory58S packlist...redirect Downloading theory58S packlist...

Can't send email from hotmail using the full version
Name: carolyn3684 Email: carolynb109athotmaildotcom Product: Firefox Summary: Can't send email from hotmail using the full version Comments: I get an error message from hotmail when I try to send email using the full version. I can only use the classic version when using firefox. I have no problem sending email from Internet Explorer. This started about the time I updated to Firefox 3 Probably about three or four days before. The error message said there was an error at sign in. I deleted the cookies and browsing history like it said but it didn't help.As I love...

can't send email or write, reply or forward...incoming is all blurred & can't read it
Name: Ellen Wood Email: sienna8841at1gotodotcom Product: Thunderbird Summary: can't send email or write, reply or forward...incoming is all blurred & can't read it Comments: Please send me back some info. to help me get back on my thunderbird...I can only receive mail, but can't even see it to read it. Browser Details: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8 ...

Can't send email when using YahooMail from Mozilla 1.4
I'm running Windows XP Pro and normally use Mozilla 1.4 (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624) to access YahooMail. Today, I tried to send someone email and discovered that after I composed the text and clicked on the "Send" button, nothing happened. The adjacent buttons "Save as Draft" and "Cancel" worked, but the "Save" button didn't do anything. I then logged off, shut down the Mozilla Gecko browser, and used Firefox 1.0.3 to access YahooMail. This time I was able to send the email. The last ti...

Can receive but can't send emails
Running W98 on a P4. I live and work on the campus of a large university in a non-English speaking country. Last Sunday, I discovered I could receive but no longer send emails to through my Yahoo and Netscape accounts from my computer, which is connected to the university LAN. On Monday, I did a complete reformat and re-install - very clean one, too! After all updates were loaded, still couldn't send. Then a 173Kb file mysteriously appeared on the desktop. It uses the Windows default icon (the one with the Windows flag) and the label consists of a tilda (~) beneath which is ...

why i can`t send mail using SmtpMail.Send?
hi all: i have a problem that.. i can`t use SmtpMail.Send() in ASP.NET`s webform... but i can easily send in Console Application using the same method... the exeception is "The 'SendUsing' configuration value is invalid" and if i setup the SmtpServer as "localhost".. the exception will be "the server denied one or more address:Unable to relay for XXX@XXX.com" why..? i really need someone can help me~~~ Have you configured your SMTP Server to allow the machine that is running that app to relay mail through it. If not, go to the...

How can I send an HTML format email using send mail
Does anyone know how to send an HTML formatted email using sendmail. I can send plain text email OK. If I format the message using HTML the message shows the HTML tags. I can't find any information regarding this on cpan. Are there any other modules that have this capability? Any help is greatly appreciated. Jeff I've sent you a private message with a script. I didn't think it would be appropriate to post that much code to the list. Agustin Rivera Webmaster, Pollstar.com http://www.pollstar.com ----- Original Message ----- From: "jeff" <we...

Can't send emails to non-local email accounts
I'm really pissed at this now, I have been trying my best to research for the reason why this following method of mine doesn't send emails to non-local email accounts?? The method is as very well-known one as follows:  1 Sub SEM(ByVal from As String, ByVal recepient As String, ByVal subject As String, ByVal body As String, Optional ByVal bcc As String = "", Optional ByVal cc As String = "") 2 3 Try 4 ' Instantiate a new instance of MailMessage 5 Dim mMailMessage As New System.Net.Mail.MailMess...

Web resources about - I can`t send email using Indy [Edit] - embarcadero.cppbuilder.socket

Edits Quarterly
“Short narratives in film and photography”, by Ian Coyle. Do yourself a favor and view it on a big display in Safari in full-screen mode.

Wikipedia:Obsessive edit-counting disorder - Wikipedia, the free encyclopedia
Obsessive edit-counting disorder ( OECD ) or editcountitis is a serious condition consisting of an unhealthy obsession with the number of edits ...

Articles with edits awaiting review - Wikipedia, the free encyclopedia
As part of a Request for Comment on pending-changes protection , a third phase considered its use in the short term. In accordance with consensus ...

Facebook Users Will Soon Be Able To Edit Their ‘A Look Back’ Videos
Facebook users who are unhappy with the photos chosen by the social network for their A Look Back videos will soon be able to do something about ...

Serena Williams Guest Edits Wired
... singles, doubles, and mixed doubles titles combined among active players. Yes, male or female. Williams’s latest area of domination? Editor ...

Markdown Edit is a distraction-free editor for Windows
Markdown is a lightweight and readable markup language which makes it easy to create rich text documents with a plain text editor. How easy? ...

Politico Edits Ben Carson Hit Piece, Drops Claims of ‘Fabrication’
Politico has rewritten several portions of an article accusing Ben Carson of "fabricating" his personal biography involving West Point.

Scientists have discovered a way to edit DNA with unprecedented precision — here's how it works
Science journalist Carl Zimmer explains how the revolutionary new genome editing tool CRISPR works. Zimmer is a columnist for The New York Times ...

Kevin Weil: Why you can't edit tweets - Business Insider
Editing a tweet on Twitter isn't as simple as fixing typos.

AOL Updates Kanvas, Turns it Into a Live Streaming App You Can Edit on the Fly
... Twitter’s Periscope . Like any app entering a crowded market, Kanvas has a feature that sets it apart. In their case, it’s on the fly editing ...

Resources last updated: 11/26/2015 9:29:38 AM