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

📄 unitconst.pas

📁 Mailserver Source code - Delphi. Simple Mail server source code. SMTP and POP3 protocols.
💻 PAS
字号:
unit UnitConst;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Grids, DBGrids, ExtCtrls, ComCtrls,server_TLB,ComObj, StdCtrls,inifiles;

procedure  C_SaveMailData(Astr:string);
function   C_GetMailUserID(AMailStr:string):string;
procedure  C_SetCombox(AStr:string;AComboBox:TComboBox);

implementation

procedure C_SetCombox(AStr:string;AComboBox:TComboBox);
var
  MyList:TStringList;
begin
  MyList:=TStringList.Create;
  try
    MyList.Text:=AStr;
    AComboBox.Clear;
    AComboBox.Items.AddStrings(MyList);
    if MyList.Count>0 then
    begin
      AComboBox.ItemIndex:=0;
    end;
  finally
    MyList.Free;
  end;
end;

function C_GetMailUserID(AMailStr:string):string;
var
  i:integer;
begin
  i:=pos('@',AMailStr);
  if i<>0 then
  begin
    result:=copy(AMailStr,1,i-1);
  end
  else begin
    result:=AMailStr;
  end;
end;

//保存邮件----------------------------------------------------------------------
procedure C_SaveMailData(Astr:string);
var
  MyList:TStringList;
  MyPathName: array[0..255] of Char;
  MyFilePath:string;
begin
  MyList:=TStringList.Create;
  try
    gettemppath(255, @MyPathName);
    MyFilePath:=MyPathName+'\_temp.eml';
    MyList.Text:=Astr;
    MyList.SaveToFile(MyFilePath);
  finally
    MyList.Free;
  end;
end;
//------------------------------------------------------------------------------

end.

⌨️ 快捷键说明

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