%@ Import Namespace="System.Web.Mail" %> <%@ Page Language="VB" Debug="true" ResponseEncoding="Big5" aspcompat=true validaterequest="false" %> ") Exit Sub End If Dim ToMail As String If Mail1.Text <> "" Then ToMail += Mail1.Text End If If Mail2.Text <> "" Then ToMail += "," & Mail2.Text End If If Mail3.Text <> "" Then ToMail += "," & Mail3.Text & "," End If If Mail4.Text <> "" Then ToMail += "," & Mail4.Text & "," End If If Mail5.Text <> "" Then ToMail += "," & Mail5.Text & "," End If Dim MailObject As New MailMessage Dim str As String MailObject.To = ToMail '請輸入收件者郵件 MailObject.From = 姓名.Text & "<"& MyMail.Text &">" MailObject.Subject = 姓名.Text & "推薦您參加2005年IPv6研討會" MailObject.BodyFormat = MailFormat.Html 'Dim meMailAttachment As New System.Web.Mail.MailAttachment(Server.MapPath("edm/edm.html")) '//設定附件 'MailObject.Attachments.Add(meMailAttachment) str = "推薦您參加2005年IPv6研討會" MailObject.Body = str SmtpMail.SmtpServer = "127.0.0.1" SmtpMail.Send(MailObject) Response.Write("") End Sub