468,510 Members | 1,790 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,510 developers. It's quick & easy.

how do I reconfigure the email

Hi there,

I have a piece of code but it is not going for some reaseon. An email should send out to people when a news is aded.

Would anyone be able to point me to the right direction?

The new webserver is sitting in a separate work group. The mailserver is sitting in the domain.

The Integrated Windows Authentication was enabled in the IIS6.0

Here is the piece of code which was running in the old server but not in the current webserver.

Expand|Select|Wrap|Line Numbers
  1. 'news email starts
  2. dim mailconfig, mail
  3. dim sql,sch
  5. set mailconfig = Server.CreateObject("CDO.Configuration")
  6. Set mail = Server.CreateObject("CDO.Message")
  8. sch = "http://schemas.microsoft.com/cdo/configuration/"
  9. mailConfig.fields.Item(sch & "sendusing") = 2
  10. mailConfig.fields.Item(sch & "smtpserver") = "cslmail"
  11. mailConfig.fields.update
  13. Set mail.Configuration = mailConfig
  15. 'mail.from = Right(request.servervariables("logon_user"),Len(request.servervariables("logon_user"))-4) & "@wart.co.nz"
  16. mail.from = "news@ct.co.nz"
  17. mail.To = "users@wart.co.nz"
  18. mail.subject = "NEWS: " & request("header")
  19. mail.Textbody = "A news article has been added. Please click one of the following links to read it: " & vbcrlf & vbcrlf & "http://intranet/news/default.asp" & vbcrlf  
  20. mail.send
Aug 12 '10 #1
1 1306
321 Expert 100+
You will need to authenticate with the server. Look at the examples that have "sendusername" specified on this page:
Oct 13 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

12 posts views Thread by Chuck Anderson | last post: by
10 posts views Thread by Andrew DeFaria | last post: by
2 posts views Thread by BSG-SMTP-Gateway | last post: by
2 posts views Thread by Mike TI | last post: by
2 posts views Thread by stew dean | last post: by
14 posts views Thread by bugmagnet | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.