F
ffinnder
Пишу программу(ниже код) и все потоки подключаются, а когда начинают отсылать письмо, то вылетает еррор: 'Incorrect authentication data'
В чем можеть быть трабла?
procedure TForm1.Button1Click(Sender: TObject);
begin
for d:=1 to form1.memo1.Lines.Count do
begin
t[d]:=tidsmtp.Create(self);
msg[d]:=tidmessage.Create(t[d]);
end;
tsend.Create(false);
procedure tsend.Execute;
var
g: integer;
s: string; h: integer;
begin
For g :=1 to form1.Memo1.Lines.Count do
begin
S := form1.Memo1.Lines[g];
S := Copy(s, 0, Pos(';', s)-1);
t[g].Username:=s;
t[g].host:=form1.edit7.text;
t[g].AuthenticationType:=atLogin;
end;
for g:= 1 to form1.Memo1.Lines.Count do
begin
S := form1.Memo1.Lines[g];
S := Copy(s, Pos(';', s)+1, Length(s)-Pos(';', s)+1);
t[g].Password:=s;
end;
for g:=1 to form1.Memo1.Lines.Count do
begin
t[g].Connect;
end;
for g:=1 to form1.Memo1.Lines.Count do
begin
msg[g].Recipients.EMailAddresses:='mail@mail.com';
msg[g].Subject:=form1.Edit1.Text;
msg[g].Body.Text:=form1.Edit6.Text;
msg[g].From.Address:=t[g].Username;
msg[g].Date:=StrToDate('07.07.2007');
end;
for g:=1 to form1.Memo1.Lines.Count do
t[g].Send(msg[g]);
end;
В чем можеть быть трабла?
procedure TForm1.Button1Click(Sender: TObject);
begin
for d:=1 to form1.memo1.Lines.Count do
begin
t[d]:=tidsmtp.Create(self);
msg[d]:=tidmessage.Create(t[d]);
end;
tsend.Create(false);
procedure tsend.Execute;
var
g: integer;
s: string; h: integer;
begin
For g :=1 to form1.Memo1.Lines.Count do
begin
S := form1.Memo1.Lines[g];
S := Copy(s, 0, Pos(';', s)-1);
t[g].Username:=s;
t[g].host:=form1.edit7.text;
t[g].AuthenticationType:=atLogin;
end;
for g:= 1 to form1.Memo1.Lines.Count do
begin
S := form1.Memo1.Lines[g];
S := Copy(s, Pos(';', s)+1, Length(s)-Pos(';', s)+1);
t[g].Password:=s;
end;
for g:=1 to form1.Memo1.Lines.Count do
begin
t[g].Connect;
end;
for g:=1 to form1.Memo1.Lines.Count do
begin
msg[g].Recipients.EMailAddresses:='mail@mail.com';
msg[g].Subject:=form1.Edit1.Text;
msg[g].Body.Text:=form1.Edit6.Text;
msg[g].From.Address:=t[g].Username;
msg[g].Date:=StrToDate('07.07.2007');
end;
for g:=1 to form1.Memo1.Lines.Count do
t[g].Send(msg[g]);
end;