出来るのだASP Q&A掲示板(過去LOG)
訪問数 52046
昨日 889
今日 776 【PR】 パソコン入門からIT専門書まで幅広く取り揃えています。セブン-イレブン受取り手数料無料のセブンアンドワイ。 |
![]() ![]() ![]() ![]() ![]() |
[5524] Re:汎用関数とか投函してみませんか? |
投稿者:ビギナーズラックさん 2005/12/15 1:39:51 |
個人的には.NET推進派なのでVB.NET版の送信モジュールも Function SendMailEx(ByVal strSMTP As String, ByVal strTo As String, ByVal strFrom As String, ByVal strSub As String, ByVal strMsg As String, ByVal strXMailer As String) As Boolean '******************** 'VB.NET版メール送信 '******************** Dim objMsg As New System.Web.Mail.MailMessage Try objMsg.BodyEncoding = System.Text.Encoding.GetEncoding("iso-2022-jp") objMsg.BodyFormat = Web.Mail.MailFormat.Text objMsg.Priority = Web.Mail.MailPriority.Normal objMsg.From = strFrom objMsg.To = strTo objMsg.Subject = strSub objMsg.Body = strMsg objMsg.Headers.Add("X-Mailer", strXMailer) System.Web.Mail.SmtpMail.SmtpServer = strSMTP System.Web.Mail.SmtpMail.Send(objMsg) Return False Catch ex As Exception Return True Finally objMsg = Nothing End Try End Function |
![]() ![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
TreeBBS For ASP V.0.1.3 |