求助一个ASP.net的邮件发送界面
求助一个的邮件发送界面,使用后台语言,包含发件地址、收件地址、邮件主题、邮件内容、附件。邮件内容转换为html格式,邮件内容大小<=5000个字符,附件大小<=500Mb。
如果能够用,人民币酬谢。发到:2653043392@ 邮箱中
[此贴子已经被作者于2018-1-2 14:17编辑过]
[此贴子已经被作者于2018-1-2 14:17编辑过]
Imports Microsoft.VisualBasic Public Class AAA Inherits System.Web.UI.Page Public Shared Sub SendEmail(.....) Dim strSMTP = ConfigurationManager.AppSettings("MailServer").ToString 'Define : SMTP Server Name Dim myMail As MailMessage Dim mySMTP As SmtpClient myMail = New MailMessage() mySMTP = New SmtpClient() ...... try myMail.Priority = MailPriority.Normal myMail.Subject = strEmailSubject myMail.IsBodyHtml = True myMail.Body = strEmailBody & strEmailSig mySMTP.Host = strSMTP mySMTP.Send(myMail) catch ex As Exception 'XXXX Finally myMail.Dispose() If Not mySMTP.Host = "" Then mySMTP.Dispose() End If End Try End Sub End Class