Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit Unit2;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, ExtCtrls, StdCtrls;
- type
- TForm2 = class(TForm)
- Button1: TButton;
- Label1: TLabel;
- Label2: TLabel;
- Label3: TLabel;
- Label4: TLabel;
- Label5: TLabel;
- Edit1: TEdit;
- Edit2: TEdit;
- Edit3: TEdit;
- Edit4: TEdit;
- Edit5: TEdit;
- Panel1: TPanel;
- Panel2: TPanel;
- Label6: TLabel;
- Label7: TLabel;
- Label8: TLabel;
- Edit6: TEdit;
- Edit7: TEdit;
- Edit8: TEdit;
- procedure FormCreate(Sender: TObject);
- procedure Button1Click(Sender: TObject);
- procedure OnClose(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form2: TForm2;
- config: text;
- server: string;
- from: string;
- _to: string;
- subject: string;
- content: string;
- _from: string;
- __to: string;
- _subject: string;
- implementation
- {$R *.dfm}
- procedure TForm2.FormCreate(Sender: TObject);
- begin
- AssignFile(config,'fakemail.cfg');
- reset(config);
- readln(config,server);
- readln(config,from);
- readln(config,_to);
- readln(config,subject);
- readln(config,content);
- readln(config,_from);
- readln(config,__to);
- readln(config,_subject);
- Edit1.Text:=server;
- Edit2.Text:=from;
- Edit3.Text:=_to;
- Edit4.Text:=subject;
- Edit5.Text:=content;
- Edit6.Text:=_from;
- Edit7.Text:=__to;
- Edit8.Text:=_subject;
- CloseFile(config);
- end;
- procedure TForm2.Button1Click(Sender: TObject);
- begin
- rewrite(config);
- server:=Edit1.Text;
- from:=Edit2.Text;
- _to:=Edit3.Text;
- subject:=Edit4.Text;
- content:=Edit5.Text;
- _from:=Edit6.Text;
- __to:=Edit7.Text;
- _subject:=Edit8.Text;
- writeln(config,server);
- writeln(config,from);
- writeln(config,_to);
- writeln(config,subject);
- writeln(config,content);
- writeln(config,_from);
- writeln(config,__to);
- writeln(config,_subject);
- CloseFile(config);
- end;
- procedure TForm2.OnClose(Sender: TObject);
- begin
- rewrite(config);
- server:=Edit1.Text;
- from:=Edit2.Text;
- _to:=Edit3.Text;
- subject:=Edit4.Text;
- content:=Edit5.Text;
- _from:=Edit6.Text;
- __to:=Edit7.Text;
- _subject:=Edit8.Text;
- writeln(config,server);
- writeln(config,from);
- writeln(config,_to);
- writeln(config,subject);
- writeln(config,content);
- writeln(config,_from);
- writeln(config,__to);
- writeln(config,_subject);
- CloseFile(config);
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement