如何发送邮件(50分)

  • 主题发起人 飞来石
  • 开始时间

飞来石

Unregistered / Unconfirmed
GUEST, unregistred user!
请问,如何使用TNMSMTP组件发送邮件,请给出例子。请问其中"FromAddress"应怎样设置。
如:从本地发送邮件到mymailbox@sina.com
 
比如你想在对方显示信是 xxx@abc.com 发出的
NMSTMP1.PostMessage.FromAddress:='xxx@abc.com';
 
try
smtp.host:=strsend;
smtp.postmessage.FromAddress:='gouzy@sunv.com';
smtp.PostMessage.FromName :='gouzy';
smtp.UserID :=strusername;

smtp.postmessage.ToAddress.text:=edtsend.text;
smtp.PostMessage.Subject :=edtmain.text;
smtp.PostMessage.Body.Add(mmsend.Lines.Text);

btnsend.Enabled :=false;
btnstop.Enabled :=true;
smtp.Connect;
except on eaccessviolation do
showmessage('asdfasdfasdf');
end;
 
会遇到SMTP认证问题!
 
看675636号贴子
 
http://www.delphibbs.com/delphibbs/dispq.asp?lid=1702834
 
发信给我,我这儿自编了一个验证smtp的发送程序………
yanchunyi@163.com

 
接受答案了.
 
顶部