L
LearningAug
Unregistered / Unconfirmed
GUEST, unregistred user!
我的邮件发送代码如下,使用的是 Indy的 TIdMessage和 TIdSMTP控件来做的:
procedure TForm1.OnBtSendEMail(Sender: TObject);
begin
try
IdSMTP1.Host := 'smtp.163.com';
IdSMTP1.Port := 25;
IdSMTP1.Username := 'flying@163.com';
IdSMTP1.Password := '我的密码';
IdSMTP1.Connect;
except
Exception.Create('Error');
end;
try
IdMessage1.From.Address := 'flying@163.com';
IdMessage1.Recipients.EMailAddresses := 'good@tom.com';
IdMessage1.Subject := 'Test';
IdMessage1.Body.Text := 'Test EMail';
IdMessage1.Priority := mpNormal;
IdSMTP1.Send(IdMessage1);
finally
IdSMTP1.Disconnect;
end;
end;
每次发送都抱错,好象是需要什么身份验证之类的,请问各位大虾,这个问题应该怎么解决哈,分不够我可以在加!!先谢谢了!
procedure TForm1.OnBtSendEMail(Sender: TObject);
begin
try
IdSMTP1.Host := 'smtp.163.com';
IdSMTP1.Port := 25;
IdSMTP1.Username := 'flying@163.com';
IdSMTP1.Password := '我的密码';
IdSMTP1.Connect;
except
Exception.Create('Error');
end;
try
IdMessage1.From.Address := 'flying@163.com';
IdMessage1.Recipients.EMailAddresses := 'good@tom.com';
IdMessage1.Subject := 'Test';
IdMessage1.Body.Text := 'Test EMail';
IdMessage1.Priority := mpNormal;
IdSMTP1.Send(IdMessage1);
finally
IdSMTP1.Disconnect;
end;
end;
每次发送都抱错,好象是需要什么身份验证之类的,请问各位大虾,这个问题应该怎么解决哈,分不够我可以在加!!先谢谢了!