S
sun_delphi
Unregistered / Unconfirmed
GUEST, unregistred user!
try
SMTP.Connect;
Msg.Reset;
Msg.ToList.Clear;
Msg.CcList.Clear;
Msg.SetFrom(frm_main.design.fieldbyname('用户').asstring, frm_main.design.fieldbyname('用户').asstring);
Msg.SetReplyTo(wwIncrementalSearch2.Text,wwIncrementalSearch2.Text);
Msg.Subject:=Edit1.Text;
Msg.TextPlain.Add(Memo2.Lines.Text);
Msg.Date:=now;
Msg.Priority:=TMailPriority(2);
Msg.SetReceipt(wwIncrementalSearch2.Text,wwIncrementalSearch2.Text);
//if mToNames.Items.Count > 0 then
Msg.ToList.SetAll(wwIncrementalSearch2.Text, wwIncrementalSearch2.Text);
//if mCcNames.Items.Count > 0 then
Msg.CcList.SetAll(wwIncrementalSearch2.Text,wwIncrementalSearch2.Text);
for i:=0 to bsSkinFileListView1.Items.Count-1 do
begin
Msg.AttachFile(bsSkinFileListView1.SelectedFilenames,'',false);
end;
Msg.RebuildBody;
SMTP.SendMessage();
SMTP.Quit;
showmessage('ok');
except
showmessage('fail');
end;
为什么接收不到发出的邮件,有用过mail2000的朋友吗?
SMTP.Connect;
Msg.Reset;
Msg.ToList.Clear;
Msg.CcList.Clear;
Msg.SetFrom(frm_main.design.fieldbyname('用户').asstring, frm_main.design.fieldbyname('用户').asstring);
Msg.SetReplyTo(wwIncrementalSearch2.Text,wwIncrementalSearch2.Text);
Msg.Subject:=Edit1.Text;
Msg.TextPlain.Add(Memo2.Lines.Text);
Msg.Date:=now;
Msg.Priority:=TMailPriority(2);
Msg.SetReceipt(wwIncrementalSearch2.Text,wwIncrementalSearch2.Text);
//if mToNames.Items.Count > 0 then
Msg.ToList.SetAll(wwIncrementalSearch2.Text, wwIncrementalSearch2.Text);
//if mCcNames.Items.Count > 0 then
Msg.CcList.SetAll(wwIncrementalSearch2.Text,wwIncrementalSearch2.Text);
for i:=0 to bsSkinFileListView1.Items.Count-1 do
begin
Msg.AttachFile(bsSkinFileListView1.SelectedFilenames,'',false);
end;
Msg.RebuildBody;
SMTP.SendMessage();
SMTP.Quit;
showmessage('ok');
except
showmessage('fail');
end;
为什么接收不到发出的邮件,有用过mail2000的朋友吗?