Приветствую Вас, Гость! Регистрация RSS

Мой сайт

Суббота, 16.05.2026
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Модератор форума: Maxxx  
Скрипт: Отправка анонимной почты
NisДата: Вторник, 06.09.2011, 13:59 | Сообщение # 1
Basicminator
Группа: Администраторы
Сообщений: 46
Репутация: 32767
Статус: Offline
Code
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Psock, NMsmtp, StdCtrls;

type
TForm1 = class(TForm)
Edit1: TEdit;
Label1: TLabel;
Label2: TLabel;
Edit2: TEdit;
Label3: TLabel;
Label4: TLabel;
Edit4: TEdit;
GroupBox1: TGroupBox;
Button1: TButton;
NMSMTP1: TNMSMTP;
OpenDialog1: TOpenDialog;
Button2: TButton;
Memo1: TMemo;
Label5: TLabel;
Button3: TButton;
Memo2: TMemo;
Label6: TLabel;
Edit3: TEdit;
Memo3: TMemo;
Button4: TButton;
Button5: TButton;
procedure OpenDialog1CanClose(Sender: TObject; var CanClose: Boolean);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.OpenDialog1CanClose(Sender: TObject;
var CanClose: Boolean);
begin
Memo2.Lines.Add(OpenDialog1.FileName);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
OpenDialog1.Execute;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
Memo2.Clear;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
With NMSMTP1 Do Begin
NMSMTP1.PostMessage.Attachments.Text:=Memo2.Text;
NMSMTP1.PostMessage.Body.Text:=Memo1.Text;
NMSMTP1.PostMessage.FromAddress:=Edit2.Text; //Здесь указывешь [email]capitan@nemo.org[/email] и все просто  
//офигивают
NMSMTP1.PostMessage.FromName:=Edit3.Text;
NMSMTP1.PostMessage.Subject:=Edit4.Text;
NMSMTP1.PostMessage.ToAddress.Add(Memo3.Text);
NMSMTP1.SendMail
End;
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
NMSMTP1.Host:=Edit1.Text;
NMSMTP1.Connect;
end;

procedure TForm1.Button5Click(Sender: TObject);
begin
NMSMTP1.Host:=Edit1.Text;
NMSMTP1.DisConnect;
end;

end.
 
  • Страница 1 из 1
  • 1
Поиск: