Код:
idSMTP1.Host:='smtp.yandex.ru';
idSMTP1.Port:=25;
idSMTP1.Username:='******';
idSMTP1.Password:='*******';
idMessage1.Body.text:='Держи ещё архив с документами';
idMessage1.From.text:='frost@yandex.ru';
idMessage1.Recipients.EMailAddresses:='v*****t@***.ru';
idMessage1.Subject:='Секретная информация';
TIdAttachment.Create(IdMessage1.MessageParts, 'C:\Win\install.rar');
idSMTP1.Connect();
if idSMTP1.Connected=true then
idSMTP1.Send(idMessage1);
try
idSMTP1.Disconnect;
except
end;
__________________
Пишу программы за еду.
__________________
|