BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

pop read and smtp send more than one time problem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
ganesh
Guest





PostPosted: Thu Nov 27, 2003 8:49 am    Post subject: pop read and smtp send more than one time problem Reply with quote




Here the problem, i want to read emails more than 1 times, and every time i forward that emails to different person
i use indy pop and indy smtp, delphi 5

i can read the first time without any problem, but the next times, i've problem it reads emails correctly,
but not forwarding emails what's the problem here




var
I, Count: Integer;

idSmtp.Connect;
Try
IdPOP.Connect;
Try
Count := IdPOP.CheckMessages;

For I := 1 to Count Do
Begin
IdMessage1.Clear;
IdMessage1.NoDecode := True;

If not IdPOP.Retrieve(I, IdMessage1) Then
Begin
ShowMessage('not ret');
Continue;
End;

IdMessage1.Recipients.EMailAddresses := 'abcv.xya@s.co.uk';
Try
idSmtp.Send(idMessage1);
Except
ShowMessage('not sent');
Continue;
End;

End;
Finally
IdPOP.Disconnect;
End;
Finally
idSmtp.Disconnect;
End;


Thanks
Back to top
ganesh
Guest





PostPosted: Thu Nov 27, 2003 10:06 am    Post subject: Re: pop read and smtp send more than one time problem Reply with quote




I tried what you said, but still the problem exist, just i copied 17 emails to the new server

first time it reads 17 emails and forwarded to another email, but the next time it forwarded only 6 emails out of 17, if i try again always it sends 6 emails out of 17, that 6 is always same

any idea, problem of indy or exchange mail server

Thanks

"ganesh" <gsganesh (AT) yahoo (DOT) com> wrote:
Quote:

Here the problem, i want to read emails more than 1 times, and every time i forward that emails to different person
i use indy pop and indy smtp, delphi 5

i can read the first time without any problem, but the next times, i've problem it reads emails correctly,
but not forwarding emails what's the problem here




var
I, Count: Integer;

idSmtp.Connect;
Try
IdPOP.Connect;
Try
Count := IdPOP.CheckMessages;

For I := 1 to Count Do
Begin
IdMessage1.Clear;
IdMessage1.NoDecode := True;

If not IdPOP.Retrieve(I, IdMessage1) Then
Begin
ShowMessage('not ret');
Continue;
End;

IdMessage1.Recipients.EMailAddresses := 'abcv.xya@s.co.uk';
Try
idSmtp.Send(idMessage1);
Except
ShowMessage('not sent');
Continue;
End;

End;
Finally
IdPOP.Disconnect;
End;
Finally
idSmtp.Disconnect;
End;


Thanks


Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Thu Nov 27, 2003 10:56 am    Post subject: Re: pop read and smtp send more than one time problem Reply with quote




"ganesh" <gsganesh (AT) yahoo (DOT) com> wrote


Quote:
i've problem it reads emails correctly, but not forwarding emails

You did not specify what the actual problem is that you are experiencing.

Quote:
IdMessage1.NoDecode := True;

Try setting the NoEncode property to true as well.


Gambit



Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Thu Nov 27, 2003 10:58 pm    Post subject: Re: pop read and smtp send more than one time problem Reply with quote


"ganesh" <gsganesh (AT) yahoo (DOT) com> wrote


Quote:
first time it reads 17 emails and forwarded to another email, but
the next time it forwarded only 6 emails out of 17, if i try again
always it sends 6 emails out of 17, that 6 is always same

Once again, you did not provide enough details to diagnose your problem.
Just saying "it does not work" says nothing at all about the actual problem
you are experiencing. Please provide specific details. Is Retrieve()
returning false? Is an exception being thrown? Is everything running fine
as expected but the message simply don't arrive? Where EXACTLY is the code
failing to do what you expect it to do?


Gambit



Back to top
ganesh
Guest





PostPosted: Fri Nov 28, 2003 11:28 am    Post subject: Re: pop read and smtp send more than one time problem Reply with quote

i didn't get any error, it never fails at any place, but i can't receive any email to the forwared email account

every time it counts all the messages ,read and send but actually i don't receive any emails


Thanks


"Remy Lebeau (TeamB)" <gambit47.no.spam (AT) no (DOT) spam.yahoo.com> wrote:
Quote:

"ganesh" <gsganesh (AT) yahoo (DOT) com> wrote in message
news:3fc5dab4$1 (AT) newsgroups (DOT) borland.com...

first time it reads 17 emails and forwarded to another email, but
the next time it forwarded only 6 emails out of 17, if i try again
always it sends 6 emails out of 17, that 6 is always same

Once again, you did not provide enough details to diagnose your problem.
Just saying "it does not work" says nothing at all about the actual problem
you are experiencing. Please provide specific details. Is Retrieve()
returning false? Is an exception being thrown? Is everything running fine
as expected but the message simply don't arrive? Where EXACTLY is the code
failing to do what you expect it to do?


Gambit




Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Sat Nov 29, 2003 12:58 am    Post subject: Re: pop read and smtp send more than one time problem Reply with quote


"ganesh" <gsganesh (AT) yahoo (DOT) com> wrote


Quote:
i didn't get any error, it never fails at any place

Then the messages have to have been sent to the destination server
correctly. The only possibility for not receiving everything would be if
some of the messages were rejected by the destination server and bounced
back to the sender, and you're not taking that scenerio into account.


Gambit




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.