ANA SAYFA
  • Register
поздравления с новорожденным

Delphi MultiPlatform EMail Gönderimi

 var
IdMessage : TIdMessage;
IdSMTP: TIdSMTP;
IdSSL: TIdSSLIOHandlerSocketOpenSSL;
 
begin
IdMessage := TIdMessage.Create(nil);
IdSMTP := TIdSMTP.Create(nil);
IdSSL := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
IdSMTP.IOHandler := IdSSL;
IdSMTP.UseTLS := utUseImplicitTLS;
 
IdMessage.From.Address := '***********'; Gönderen mail
IdMessage.Recipients.EMailAddresses := email.Text;
IdMessage.Subject := konu.Text;
IdMessage.Body.Text := aciklama.Text;
 
IdSMTP.Host := 'smtp.gmail.com';
IdSMTP.Port := 465;
IdSMTP.Username := '************'; //kullanıcı adı
IdSMTP.Password := '************'; // şifre
IdSMTP.Connect;
    IdSMTP.Authenticate;
   try
 
    IdSMTP.Send(IdMessage);
    finally
    if IdSMTP.Connected then IdSMTP.Disconnect;
    end;
    showmessage('Mailiniz gönderilmiştir');
 
IdMessage.Free;
IdSSL.Free;
IdSMTP.Free;
end;
 

Ziyaretciler

0162796
Bugün
Dün
Bu Hafta
Hafta
Bu Ay
Ay
Toplam
91
254
571
134797
2449
3422
162796

IPniz: 54.144.57.183
Server Time: 2017-11-24 16:26:34