TCP/IP(八)(2)
2008-04-09 04:30:55来源:互联网 阅读 ()
(*@/// destructor t_mail.Destroy; *)
destructor t_mail.Destroy;
begin
f_receipts.Free;
f_cc.free;
f_bcc.free;
inherited destroy;
end;
(*@\\\0000000601*)
(*@/// procedure t_mail.SetRecipients(Value: TStringList); *)
procedure t_mail.SetRecipients(Value: TStringList);
begin
if value=NIL then
f_receipts.clear
else
f_receipts.assign(value);
end;
(*@\\\0000000603*)
(*@/// procedure t_mail.SetCC(Value: TStringList); *)
procedure t_mail.SetCC(Value: TStringList);
begin
if value=NIL then
f_cc.clear
else
f_cc.assign(value);
end;
(*@\\\0000000609*)
(*@/// procedure t_mail.SetBCC(Value: TStringList); *)
procedure t_mail.SetBCC(Value: TStringList);
begin
if value=NIL then
f_bcc.clear
else
f_bcc.assign(value);
end;
(*@\\\0000000601*)
(*@/// procedure t_mail.action; *)
procedure t_mail.action;
var
i: integer;
clear_sender: boolean;
begin
if (f_smtp=NIL) or (f_receipts=NIL) or (f_receipts.count=0)
or (f_from='''''''') then EXIT;
clear_sender:=(f_smtp.Sender='''''''');
if clear_sender then begin
if f_sender<>'''''''' then
f_smtp.sender:=f_sender
else
f_smtp.sender:=f_from;
end;
if f_disclose_receipts then
f_message.add(''''To: disclosed recipients list'''')
else
for i:=0 to f_receipts.count-1 do begin
f_message.add(''''To: '''' f_receipts.strings[i]);
end;
f_smtp.Recipients:=f_receipts;
for i:=0 to f_cc.count-1 do begin
f_message.add(''''CC: '''' f_cc.strings[i]);
f_smtp.Recipients.add(f_cc.strings[i]);
end;
for i:=0 to f_bcc.count-1 do begin
f_smtp.Recipients.add(f_bcc.strings[i]);
end;
inherited action;
f_smtp.message:=f_message;
f_smtp.action;
f_message.clear;
if clear_sender then
f_smtp.sender:='''''''';
end;
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash
