Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Jul : Indy SMTP problems
| Subject: | Indy SMTP problems |
| Posted by: | "don" (ig..@igos.us) |
| Date: | 2 Jul 2005 20:29:38 |
Indy and Emailing problem.
My ISP cancels my emails saying I have too many messages. Am I
being looked at as a spammer? I am trying to email all those in
my community assocation. That may be a max of 200 people. Is
there anything I can do? Is my code below working like I think
it should? Basically, I step through the database table
assigning the email address field to the
Recipients.emailAddresses and send.
I am running D7 and Indy 9.0.14
Thanks,Don
INDY version 9.0.14
{authentication}
SMTP.AuthenticationType := atNone;
SMTP.Username := SmtpServerUser;
SMTP.Password := SmtpServerPassword;
{General}
SMTP.Host := SmtpServerName;
SMTP.Port := SmtpServerPort; // 25
{connect}
SMTP.Connect;
tblEmailList.First;
with tblEmailList do
while (not eof) do
begin
// load message and send
with IdMsgSend do
begin
Body.Assign(Memo1.Lines);
From.Text :=UserEmail;
ReplyTo.EMailAddresses :=UserEmail;
Recipients.EMailAddresses :=fieldByName'email').AsString;
Subject :=edtSubject.Text;
end;
try
SMTP.Send(IdMsgSend);
memoLog.Lines.Add('Mail sent to ' + fieldByName'email').AsString);
finally
Application.ProcessMessages;
end;
Next;
end;
if (smtp.Connected) then SMTP.Disconnect;
end;
If I stop and start the SMTP connection, Indy gives me an err of
too many connections.