Imports System.Web.Mail
Dim mailMsg As MailMessage = New MailMessage
mailMsg.To = txtEmail.Value
mailMsg.Subject = txtTitle.Value & "(由您的朋友在金狐网给您发来祝福)"
mailMsg.From = "service@ginhoo.com"
mailMsg.Body = "您的朋友" & txtDC_WRITER.Text & "给您发表的祝福!点击查看( http://www.ginhoo.com/ginhoo_dwe/dwe/area/Area_benison.aspx?di_id=" & pm.getOutValue("bRt_id") & "&dc_id=" & Request.QueryString("dc_id") & "&dp_id=" & Request.QueryString("dp_id") & ")"
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1")
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "service@ginhoo.com")
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "ginhoo.com")
System.Web.Mail.SmtpMail.SmtpServer = "smtp-ent.21cn.com"
System.Web.Mail.SmtpMail.Send(mailMsg)
![](https://img2024.cnblogs.com/blog/35695/202403/35695-20240328092537879-1189167464.jpg)