ITPub博客

首页 > 应用开发 > IT综合 > ASP sending Email

ASP sending Email

原创 IT综合 作者:xxdxxdxxd 时间:2007-01-03 14:12:32 0 删除 编辑

SET rsMailQ = objConn.Execute("SELECT * FROM mailqueue WHERE date_sent IS NULL")

While NOT rsEmails.EOF


Set objMailer = Server.CreateObject("Persits.MailSender")
objMailer.Host = MailServer

objMailer.Charset = "UTF-8"
objMailer.ContentTransferEncoding = "Quoted-Printable"
objMailer.From = rsEmails("From")
objMailer.FromName = rsEmails("FromName")
objMailer.AddAddress rsEmails("To")
objMailer.Subject = rsEmails("Subject")
objMailer.Body = rsEmails("msg")

objMailer.Queue = True
objMailer.Send


strSQL = "UPDATE MailQueue SET date_sent = GETUTCDATE() " _
& "WHERE mail_queue_id = " & rsEmails("mail_queue_id")

Set rsUpdate = CreateObject("ADODB.Recordset")
rsUpdate.Open strSQL, objConn

Wend

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/1697933/viewspace-888078/,如需转载,请注明出处,否则将追究法律责任。

上一篇: Disaster Plan
请登录后发表评论 登录
全部评论

注册时间:2008-09-15

  • 博文量
    56
  • 访问量
    510735