Delphi 2010 ve Delpi XE2 aynı pc üzerinde kullanımı!
Destek talebi(Lütfen oy verelim!)
Sitemiz üye alımına kapatılmıştır!
! CODEBANK 2012 !
İNDİRMEK&DETAYLI BİLGİ ALMAK İÇİN BURAYI TIKLAYINIZ.
0 Üye ve 1 Ziyaretçi konuyu incelemekte.
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, IdMessage, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdMessageClient, IdSMTP, StdCtrls;type TForm1 = class(TForm) Edit1: TEdit; Edit2: TEdit; Edit3: TEdit; Edit4: TEdit; Memo1: TMemo; Button1: TButton; Button2: TButton; Button3: TButton; IdSMTP1: TIdSMTP; // Delphi 7 de indy Client sekmesinde OpenDialog1: TOpenDialog; // Tüm Delphilerde Dialog sekmesinde IdMessage1: TIdMessage;// Delphi 7 de indy Misc sekmesinde Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; procedure Button1Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);beginif OpenDialog1.Execute then Edit3.Text:=OpenDialog1.FileName; // dosya eklemek için end;procedure TForm1.Button3Click(Sender: TObject);beginClose;end;procedure TForm1.Button2Click(Sender: TObject);beginIdMessage1.Clear;IdMessage1.From.Text :=Edit1.Text; // kimden geldiğiIdMessage1.ReplyTo.EMailAddresses:=Edit1.Text; // gönderenin mail adresiIdMessage1.Recipients.EMailAddresses:=Edit2.Text; // gönderilecek adresIdMessage1.Date:=Date; //günün tarihiIdMessage1.Subject:=Edit4.Text; // konu suIdMessage1.Body.Text := memo1.Text; // mesajınız burayaIdMessage1.Priority:=mpNormal;// eklenecek dosyalarif not (Edit3.Text='') then TIdAttachment.Create(IdMessage1.MessageParts,Edit3.Text);IdMessage1.Body.Assign(Memo1.Lines);//smtp ile server a bağlanmaIdSMTP1.AuthenticationType:=atLogin;IdSMTP1.Host:='mail.isim.comt'; // mail server adıIdSMTP1.Port:=25; IdSMTP1.UserName:=' isim@isim.com '; //hesap adıIdSMTP1.Password:=' şifre buraya'; // hesap şifresiIdSMTP1.Connect; // bağlantryIdSMTP1.Send(IdMessage1); // bağlı mesajların gönderimifinally IdSMTP1.Disconnect; // bağlantını kesilmesiend;end;end.