亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mailrob1.pas

?? 包含常用Internet協議TCP,UDP、HTTP、FTP、Telnet等
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


Author:       Fran鏾is PIETTE
Object:       RobotMail is a demo program for the SMTP and MBX component from
              the ICS package. It's a kind of spam machine...
Creation:     May 21, 1998
Version:      1.10  (Tested with Delphi 3 and 4)
EMail:        francois.piette@pophost.eunet.be    francois.piette@rtfm.be
              http://www.rtfm.be/fpiette
Support:      Use the mailing list twsocket@rtfm.be See website for details.
Legal issues: Copyright (C) 1998 by Fran鏾is PIETTE
              Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56
              <francois.piette@pophost.eunet.be>

              This software is provided 'as-is', without any express or
              implied warranty.  In no event will the author be held liable
              for any  damages arising from the use of this software.

              Permission is granted to anyone to use this software for any
              purpose, including commercial applications, and to alter it
              and redistribute it freely, subject to the following
              restrictions:

              1. The origin of this software must not be misrepresented,
                 you must not claim that you wrote the original software.
                 If you use this software in a product, an acknowledgment
                 in the product documentation would be appreciated but is
                 not required.

              2. Altered source versions must be plainly marked as such, and
                 must not be misrepresented as being the original software.

              3. This notice may not be removed or altered from any source
                 distribution.

Updates:
Aug 03, 1998 V1.10 Adapted with new TSmtpCli component


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
unit MailRob1;

interface

uses
  WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms,
  Dialogs, IniFiles, MbxFile, StdCtrls, ExtCtrls, SmtpProt, DB, DBTables;

const
  RobotMailVersion = 110;

type
  TMailRobForm = class(TForm)
    MbxHandler: TMbxHandler;
    DisplayMemo: TMemo;
    TopPanel: TPanel;
    GetFromMbxButton: TButton;
    EMailMemo: TMemo;
    MiddlePanel: TPanel;
    Label1: TLabel;
    HostEdit: TEdit;
    PortEdit: TEdit;
    FromEdit: TEdit;
    Label2: TLabel;
    Subject: TLabel;
    SubjectEdit: TEdit;
    SignOnEdit: TEdit;
    Label4: TLabel;
    SmtpClient: TSyncSmtpCli;
    MbxFileEdit: TEdit;
    SendButton: TButton;
    SaveToListButton: TButton;
    LstFileEdit: TEdit;
    LoadFromListButton: TButton;
    InfoLabel: TLabel;
    Label3: TLabel;
    MsgFileEdit: TEdit;
    MsgFileLoadButton: TButton;
    SaveMsgFileButton: TButton;
    OpenDialog1: TOpenDialog;
    procedure GetFromMbxButtonClick(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormCreate(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure SendButtonClick(Sender: TObject);
    procedure SmtpClientGetData(Sender: TObject; LineNum: Integer;
      MsgLine: PChar; MaxLen: Integer; var More: Boolean);
    procedure SaveToListButtonClick(Sender: TObject);
    procedure LoadFromListButtonClick(Sender: TObject);
    procedure SmtpClientCommand(Sender: TObject; Msg: String);
    procedure SmtpClientResponse(Sender: TObject; Msg: String);
    procedure MsgFileLoadButtonClick(Sender: TObject);
    procedure SaveMsgFileButtonClick(Sender: TObject);
    procedure MbxFileEditDblClick(Sender: TObject);
    procedure MsgFileEditDblClick(Sender: TObject);
    procedure LstFileEditDblClick(Sender: TObject);
  private
    FIniFileName         : String;
    FInitialized         : Boolean;
    FTxtFileName         : String;
    FMsgLines            : TStrings;
    FNames               : TList;
    FLogFileName         : String;
    FLog                 : TStream;
    FRunning             : Boolean;
    procedure ProcessMsg;
    function  SearchHeader(Key : String) : Integer;
    procedure ClearNames;
    procedure CommitLog;
    procedure CloseLog;
    procedure Log(const Msg : String);
    procedure LoadEMailMessage(FileName : String);
    procedure SaveEMailMessage(FileName : String);
  public
    { D閏larations publiques }
  end;

var
  MailRobForm: TMailRobForm;

implementation

{$R *.DFM}
const
    SectionWindow   = 'Window';
    KeyTop          = 'Top';
    KeyLeft         = 'Left';
    KeyWidth        = 'Width';
    KeyHeight       = 'Height';
    SectionData     = 'Data';
    KeyServer       = 'MailServer';
    KeyPort         = 'SmtpPort';
    KeyFrom         = 'From';
    KeySignOn       = 'SignOn';
    KeyMbxFile      = 'MbxFile';
    KeyLstFile      = 'LstFile';
    KeyMsgFile      = 'MsgFile';

    CrLf : array [0..1] of char = (#13, #10);

{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TMailRobForm.FormCreate(Sender: TObject);
begin
    FMsgLines    := TStringList.Create;
    FNames       := TList.Create;
    FIniFileName := LowerCase(Application.ExeName);
    FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini';
    FTxtFileName := LowerCase(Application.ExeName);
    FTxtFileName := Copy(FTxtFileName, 1, Length(FTxtFileName) - 3) + 'txt';
    FLogFileName := LowerCase(Application.ExeName);
    FLogFileName := Copy(FLogFileName, 1, Length(FLogFileName) - 3) + 'log';
    CommitLog;
    Log('---- Start ----');
    InfoLabel.Caption := '';
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TMailRobForm.FormShow(Sender: TObject);
var
    IniFile : TIniFile;
begin
    if not FInitialized then begin
        FInitialized := TRUE;
        DisplayMemo.Clear;

        IniFile          := TIniFile.Create(FIniFileName);
        Top              := IniFile.ReadInteger(SectionWindow, KeyTop,    Top);
        Left             := IniFile.ReadInteger(SectionWindow, KeyLeft,   Left);
        Width            := IniFile.ReadInteger(SectionWindow, KeyWidth,  Width);
        Height           := IniFile.ReadInteger(SectionWindow, KeyHeight, Height);
        HostEdit.Text    := IniFile.ReadString(SectionData, KeyServer,  'mail.server.provider');
        PortEdit.Text    := IniFile.ReadString(SectionData, KeyPort,    'smtp');
        FromEdit.Text    := IniFile.ReadString(SectionData, KeyFrom,    'your.email@your.provider');
        SignOnEdit.Text  := IniFile.ReadString(SectionData, KeySignOn,  'Your full name');
        MbxFileEdit.Text := IniFile.ReadString(SectionData, KeyMbxFile, '');
        LstFileEdit.Text := IniFile.ReadString(SectionData, KeyLstFile, 'c:\temp\emails.txt');
        MsgFileEdit.Text := IniFile.ReadString(SectionData, KeyMsgFile, 'c:\temp\emailmsg.txt');
        IniFile.Free;
        LoadEMailMessage(FTxtFileName);
    end;
    CloseLog;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TMailRobForm.FormClose(Sender: TObject; var Action: TCloseAction);
var
    IniFile : TIniFile;
begin
    Log('Stop');
    IniFile := TIniFile.Create(FIniFileName);
    IniFile.WriteInteger(SectionWindow, KeyTop,       Top);
    IniFile.WriteInteger(SectionWindow, KeyLeft,      Left);
    IniFile.WriteInteger(SectionWindow, KeyWidth,     Width);
    IniFile.WriteInteger(SectionWindow, KeyHeight,    Height);
    IniFile.WriteSTring(SectionData, KeyServer,  HostEdit.Text);
    IniFile.WriteSTring(SectionData, KeyPort,    PortEdit.Text);
    IniFile.WriteSTring(SectionData, KeyFrom,    FromEdit.Text);
    IniFile.WriteSTring(SectionData, KeySignOn,  SignOnEdit.Text);
    IniFile.WriteSTring(SectionData, KeyMbxFile, MbxFileEdit.Text);
    IniFile.WriteSTring(SectionData, KeyLstFile, LstFileEdit.Text);
    IniFile.WriteSTring(SectionData, KeyMsgFile, MsgFileEdit.Text);
    IniFile.Free;
    SaveEMailMessage(FTxtFileName);
    MbxHandler.Active := FALSE;
    FMsgLines.Destroy;
    ClearNames;
    FNames.Destroy;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TMailRobForm.LoadEMailMessage(FileName : String);
begin
    EMailMemo.Clear;
    SubjectEdit.Text := '';
    try
        EMailMemo.Lines.LoadFromFile(FileName);
        if EMailMemo.Lines.Count > 0 then begin
            SubjectEdit.Text := EMailMemo.Lines[0];
            EMailMemo.Lines.Delete(0);
        end;
    except
        on E:Exception do Log('LoadEMailMessage failed: ' + E.Message);
    end;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TMailRobForm.SaveEMailMessage(FileName : String);
begin
    EMailMemo.Lines.Insert(0, SubjectEdit.Text);
    EMailMemo.Lines.SaveToFile(FileName);
    EMailMemo.Lines.Delete(0);
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TMailRobForm.CommitLog;
begin
    if Assigned(FLog) then
        FLog.Destroy;
    try
        FLog := TFileStream.Create(FLogFileName, fmOpenReadWrite or fmShareDenyNone);
    except
        on E:EFOpenError do begin
            try
                FLog := TFileStream.Create(FLogFileName, fmCreate);
                FLog.Destroy;
                FLog := TFileStream.Create(FLogFileName, fmOpenReadWrite or fmShareDenyNone);
            except
                DisplayMemo.Lines.Add('Can''t create log file ' + FLogFileName);
                FLog := nil;
            end;
        end;
    end;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TMailRobForm.CloseLog;
begin
    if Assigned(FLog) then begin
       FLog.Destroy;
       FLog := nil;
    end;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TMailRobForm.Log(const Msg : String);
var
    Buf : String;
begin
    if not Assigned(FLog) then begin
        CommitLog;
        if not Assigned(FLog) then
            Exit;
    end;
    Buf := FormatDateTime('yyyy/mm/dd hh:nn:ss ', Now);
    FLog.Seek(0, soFromEnd);
    FLog.WriteBuffer(Buf[1], Length(Buf));
    FLog.WriteBuffer(Msg[1], Length(Msg));
    FLog.WriteBuffer(CrLf, 2);
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TMailRobForm.GetFromMbxButtonClick(Sender: TObject);
begin
    if MbxFileEdit.Text = '' then begin
        Application.MessageBox('Please enter the file name in the edit box !',
                               'Warning', MB_OK);        
        Exit;
    end;

    GetFromMbxButton.Enabled := FALSE;
    try
        MbxHandler.FileName := MbxFileEdit.Text;
        MbxHandler.Active   := TRUE;
        ProcessMsg;
    finally
        GetFromMbxButton.Enabled := TRUE;
        MbxHandler.Active := FALSE;
    end;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
function TMailRobForm.SearchHeader(Key : String) : Integer;
var
    Line  : String;
    I, J  : Integer;
begin
    Key    := UpperCase(Key);
    Result := -1;
    I      := 0;
    while I < FMsgLines.Count do begin
        Line := FMsgLines.Strings[I];
        if Length(Line) = 0 then       { End of header }
            Break;
        J := Pos(':', Line);
        if (J > 0) and (UpperCase(Copy(Line, 1, J - 1)) = Key) then begin
            Result := I;
            Break;
        end;
        Inc(I);
    end;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TMailRobForm.ClearNames;
begin
    while FNames.Count > 0 do begin
        FreeMem(FNames.Items[0], StrLen(PChar(FNames.Items[0])) + 1);
        FNames.Delete(0);
    end;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
function StringCompare(Item1, Item2: Pointer): Integer;
begin
    Result := StrComp(PChar(Item1), PChar(Item2));

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91麻豆精品国产自产在线观看一区 | 黄色日韩网站视频| 亚洲一区二区三区四区五区中文 | 中文字幕乱码久久午夜不卡| 欧美一区二区三区视频在线观看| 欧美在线啊v一区| 欧美在线free| 91精品国产免费| 精品美女被调教视频大全网站| 日韩欧美国产一区在线观看| 26uuuu精品一区二区| 久久久久久久国产精品影院| 国产精品丝袜黑色高跟| 亚洲桃色在线一区| 一个色综合av| 麻豆国产欧美日韩综合精品二区| 国产真实乱子伦精品视频| 国产成人在线网站| 色狠狠综合天天综合综合| 88在线观看91蜜桃国自产| 精品卡一卡二卡三卡四在线| 国产午夜精品一区二区三区嫩草| 中文字幕国产一区二区| 亚洲综合区在线| 人人超碰91尤物精品国产| 国产精品99久久久久久久vr| 99国内精品久久| 欧美一级国产精品| 国产精品久久久久影视| 午夜欧美大尺度福利影院在线看 | av中文字幕一区| 欧美男人的天堂一二区| 国产亚洲欧美在线| 17c精品麻豆一区二区免费| 午夜欧美电影在线观看| 丁香婷婷综合色啪| 欧美日韩视频专区在线播放| 久久精品亚洲精品国产欧美kt∨ | 中文字幕亚洲一区二区va在线| 亚洲一级不卡视频| 国产精品99久| 91麻豆精品国产91久久久久久 | 亚洲成人资源网| 国产999精品久久| 欧美福利视频导航| 中文字幕一区不卡| 国产精品中文欧美| 69p69国产精品| 国产精品你懂的在线欣赏| 日韩欧美一区在线| 夜夜亚洲天天久久| 日韩三级高清在线| 麻豆91在线播放| 国产精品久久久久久久久动漫 | www.日韩av| 国产一区二区三区在线观看免费 | 欧美日本一道本在线视频| 国产欧美日韩精品在线| 视频一区视频二区中文字幕| 99精品国产视频| 国产日韩欧美一区二区三区乱码| 日韩精品久久理论片| 91在线观看下载| 日本一区二区成人| 国产精品538一区二区在线| 欧美一级生活片| 香蕉乱码成人久久天堂爱免费| 99国产精品久久久久| 国产欧美日韩激情| 国产精品一区二区在线观看网站| 欧美一区二区视频观看视频| 午夜久久福利影院| 欧美系列亚洲系列| 亚洲综合色区另类av| 欧美视频一区二区三区| 亚洲永久精品大片| 精品视频一区二区三区免费| 亚洲一区在线观看免费| 91小视频在线| 亚洲综合成人在线| 91黄色激情网站| 天天色天天操综合| 日韩午夜激情免费电影| 激情六月婷婷久久| 欧美激情中文字幕一区二区| 国产成人av一区二区三区在线观看| 久久综合视频网| a亚洲天堂av| 午夜欧美在线一二页| 精品伦理精品一区| 国产成人在线电影| 亚洲色图欧洲色图| 在线电影国产精品| 国产毛片精品一区| 中文字幕一区二区三区av| 91小视频在线免费看| 午夜欧美在线一二页| 久久综合狠狠综合久久激情 | 日韩va亚洲va欧美va久久| 欧美一区二区女人| 国产成人综合亚洲91猫咪| 亚洲人午夜精品天堂一二香蕉| 在线观看视频91| 经典三级视频一区| 一区二区三区日本| 日韩一区二区电影在线| 高清shemale亚洲人妖| 亚洲精品老司机| 欧美成人三级在线| eeuss鲁片一区二区三区| 色综合久久99| 亚洲欧美另类小说视频| 裸体歌舞表演一区二区| 国产精品一区二区男女羞羞无遮挡| 成人网男人的天堂| 亚洲一区二区三区小说| 久久这里只有精品视频网| 色哟哟国产精品| 久久不见久久见中文字幕免费| 18成人在线观看| 精品国产一区久久| 欧美日韩视频第一区| 成人丝袜高跟foot| 三级久久三级久久久| 国产精品免费人成网站| 欧美一级黄色片| 欧美日韩三级在线| caoporn国产一区二区| 国产一区二区导航在线播放| 丝袜美腿亚洲一区二区图片| 中文字幕欧美一| 国产欧美日韩精品a在线观看| 日韩有码一区二区三区| 国产精品欧美久久久久无广告| 精品一区二区三区免费视频| 亚洲二区在线观看| 国产精品素人一区二区| 国产视频一区在线播放| 欧美成人video| 日韩欧美国产一二三区| 欧美日韩成人在线| 欧美午夜免费电影| 欧美怡红院视频| 欧美日韩在线精品一区二区三区激情| 成人福利视频网站| 国产精品99久久久| 国产成人aaaa| 成人一区二区视频| 99热国产精品| 99久久国产综合精品麻豆| av电影一区二区| 91麻豆精东视频| 在线观看成人小视频| 在线视频你懂得一区二区三区| aaa国产一区| 色综合久久88色综合天天6| 色94色欧美sute亚洲线路一久 | 国产精品久久久久久久午夜片| 亚洲精品一区二区三区福利| 一级中文字幕一区二区| 国产最新精品免费| 91精品国产91久久久久久一区二区 | 亚洲免费在线观看视频| 亚洲女人小视频在线观看| 亚洲一级不卡视频| 蜜臀91精品一区二区三区| 精品一区二区在线观看| 国产精品一区一区三区| 99久久久精品免费观看国产蜜| 91视频91自| 欧美一区二区三区免费视频| 欧美电影免费观看高清完整版| 久久久久久麻豆| 亚洲综合在线视频| 偷拍亚洲欧洲综合| 极品少妇xxxx偷拍精品少妇| 岛国精品在线观看| 在线免费观看日本欧美| 日韩欧美国产综合一区| 国产精品久久国产精麻豆99网站| 亚洲综合清纯丝袜自拍| 国产自产视频一区二区三区| 91在线porny国产在线看| 538prom精品视频线放| 久久精品一级爱片| 亚洲图片欧美色图| 国产成人av电影在线观看| 色综合网站在线| 精品奇米国产一区二区三区| 亚洲精品免费视频| 国产黄人亚洲片| 欧美日韩高清不卡| 国产精品天干天干在观线| 男人的天堂久久精品| 色欧美日韩亚洲| 久久精品人人做人人爽97| 亚洲综合在线电影| 高清视频一区二区| 精品久久久久久最新网址| 亚洲最新在线观看|