⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 locatemail.pas

📁 一款不错的商务程序商品管理系统,有简易的窗体皮肤
💻 PAS
字号:
unit LocateMail;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, ComCtrls, Mask, DBCtrls, Buttons, DB, ADODB,Theme;

type
  TFrm_Setup = class(TBaseForm)
    Panel1: TPanel;
    PageControl1: TPageControl;
    TabSheet1: TTabSheet;
    TabSheet2: TTabSheet;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    DBEdit1: TDBEdit;
    DBEdit2: TDBEdit;
    DBEdit3: TDBEdit;
    DBEdit4: TDBEdit;
    DBEdit5: TDBEdit;
    SpeedButton1: TSpeedButton;
    SpeedButton2: TSpeedButton;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    DBEdit6: TDBEdit;
    DBEdit7: TDBEdit;
    DBEdit8: TDBEdit;
    DBEdit9: TDBEdit;
    DBEdit10: TDBEdit;
    ADOPOP3: TADODataSet;
    DSPOP3: TDataSource;
    ADOSMTP: TADODataSet;
    DSSMTP: TDataSource;
    procedure FormShow(Sender: TObject);
    procedure SpeedButton1Click(Sender: TObject);
    procedure SpeedButton2Click(Sender: TObject);
  private
    { Private declarations }
    procedure POP3Post;
    procedure SMTPPost;
  public
    { Public declarations }
  end;

var
  Frm_Setup: TFrm_Setup;

implementation
uses Main,dm;
{$R *.dfm}

{ TFrm_Setup }

procedure TFrm_Setup.POP3Post;
begin
  if DBEdit1.Text = '' then
  begin
    Application.MessageBox('接收服务器名不能为空!','明日科技');
    DBEdit1.SetFocus;
    Exit;
  end;
  if DBEdit2.Text = '' then
  begin
    Application.MessageBox('端口号不能为空!','明日科技');
    DBEdit2.SetFocus;
    Exit;
  end;
  if DBEdit3.Text = '' then
  begin
    Application.MessageBox('用户名不能为空!','明日科技');
    DBEdit3.SetFocus;
    Exit;
  end;
  if DBEdit4.Text = '' then
  begin
    Application.MessageBox('用户密码不能为空!','明日科技');
    DBEdit4.SetFocus;
    Exit;
  end;
  if DBEdit5.Text = '' then
  begin
    Application.MessageBox('用户Email地址不能为空!','明日科技');
    DBEdit5.SetFocus;
    Exit;
  end;
  ADOPOP3.UpdateBatch;
end;

procedure TFrm_Setup.SMTPPost;
begin
  if DBEdit6.Text = '' then
  begin
    Application.MessageBox('接收服务器名不能为空!','明日科技');
    DBEdit6.SetFocus;
    Exit;
  end;
  if DBEdit7.Text = '' then
  begin
    Application.MessageBox('端口号不能为空!','明日科技');
    DBEdit7.SetFocus;
    Exit;
  end;
  if DBEdit8.Text = '' then
  begin
    Application.MessageBox('用户名不能为空!','明日科技');
    DBEdit8.SetFocus;
    Exit;
  end;
  if DBEdit9.Text = '' then
  begin
    Application.MessageBox('用户密码不能为空!','明日科技');
    DBEdit9.SetFocus;
    Exit;
  end;
  if DBEdit10.Text = '' then
  begin
    Application.MessageBox('用户Email地址不能为空!','明日科技');
    DBEdit10.SetFocus;
    Exit;
  end;
  ADOSMTP.UpdateBatch;
end;

procedure TFrm_Setup.FormShow(Sender: TObject);
begin
  ADOPOP3.Close;
  ADOSMTP.Close;

  ADOPOP3.Open;
  ADOSMTP.Open;
end;

procedure TFrm_Setup.SpeedButton1Click(Sender: TObject);
begin
    POP3Post;
    SMTPPost;
end;

procedure TFrm_Setup.SpeedButton2Click(Sender: TObject);
begin
  Close;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -