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

0175681
Bugün
Dün
Bu Hafta
Hafta
Bu Ay
Ay
Toplam
36
127
882
147114
3278
4493
175681

IPniz: 54.226.55.151
Server Time: 2018-02-24 07:58:00