T
tianxing78
Unregistered / Unconfirmed
GUEST, unregistred user!
做了一个发邮件的小模块,如何让邮件接收后的发件人那一列不显示发件人的地址而显示名称?<br> IdSMTP.Host:=m_smtphost;<br> IdSMTP.Username:=m_username;<br> IdSMTP.Password:=m_password;<br> IdSMTP.AuthenticationType:=atLogin; //我的服务器要求身份验证<br> IdSMTP.Port:=m_smtpport;<br> if trim(edit2.Text)<>'' then<br> begin<br> TIdAttachment.Create(IdMessage.MessageParts,trim(edit2.Text));<br> end;<br> IdMessage.CharSet:='gb2312';<br> Idmessage.ContentType:='text/plain' ;<br>// IdMessage.ReceiptRecipient.Text:=m_userid;//是否对已经阅读的邮件作出回复,回执<br> IdMessage.From.Address:=m_email;<br> IdMessage.ReplyTo.EMailAddresses:=m_email;<br> IdMessage.Recipients.EMailAddresses:=trim(usermail.fieldbyname('email').AsString);<br> IdMessage.Body.Assign(meSend.Lines);<br> IdMessage.Subject:=edtSubject.Text;<br> try<br> IdSMTP.Connect(); //连接SMTP服务器<br> except<br> exit;<br> end;<br> try<br> IdSMTP.Authenticate;<br> IdSMTP.Send(IdMessage); //向服务器发送邮箱<br> finally<br> IdSMTP.Disconnect;<br> end;