begin
IdMessage1.From.Address := 'yu*****@163.com';
IdMessage1.Recipients.Add.Address := 'zqw****@sina.com';
IdMessage1.Sender.Address := 'yu*****@163.com';
IdMessage1.Body.Add('Test');
IdMessage1.Subject := 'Test';
IdSmtp1.Username := 'yu*****@163.com';
IdSMTP1.Password := '********************';
IdSMTP1.Connect;
try
IdSMTP1.Send(IdMessage1);
finally
IdSMTP1.Disconnect;
end;
end;
这是别人写的代码,我还没试过,不知能不能发到163等网站,你试试吧