bsp;NMSMTP1.UserId:=EditUserId.Text;
NMSMTP1.Connect;
Panel1.Color:=clBlue;
ButtonConnection2.Caption:=''断开'';
end
else begin
NMSMTP1.Disconnect;
Panel1.Color:=clRed;
ButtonConnection2.Caption:=''连接'';
end;
end;
procedure TFSMTP.FormShow(Sender: TObject);
begin
//DataMod.TableDepartment.Open;
if gs_potence[Self.Tag] = ''2'' then begin
ButtonSend.Enabled := False;
end;
Query1.Open;
QDepartKind.Open;
//ButtonConnection2.Click;
end;
procedure TFSMTP.FormClose(Sender: TObject; var Action: TCloseAction);
begin
//DataMod.TableDepartment.Close;
Query1.Close;
QDepartKind.Close;
//ButtonConnection2.Click;
Action:=CaFree;
end;
procedure TFSMTP.Button1Click(Sender: TObject);
begin
if NMSMTP1.Verify(Edit1.Text) then
// ShowMessage(Edit1.Text+'' verified'')
else
ShowMessage(Edit1.Text+'' not verified'');
end;
procedure TFSMTP.DBLookupComboBox1Click(Sender: TObject);
begin
Query1.Filter:=''部门分类=''+vartostr(DBLookupComboBox1.KeyValue);
end;
procedure TFSMTP.Button2Click(Sender: TObject);
begin
Self.Close;
end;
end.