how do I reconfigure the email

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yimma216
    New Member
    • Jul 2008
    • 44

    #1

    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.

    Code:
    'news email starts
    dim mailconfig, mail
    dim sql,sch
    		
    set mailconfig = Server.CreateObject("CDO.Configuration")
    Set mail = Server.CreateObject("CDO.Message")
    		
    sch = "http://schemas.microsoft.com/cdo/configuration/"
    mailConfig.fields.Item(sch & "sendusing") = 2
    mailConfig.fields.Item(sch & "smtpserver") = "cslmail"
    mailConfig.fields.update
    		
    Set mail.Configuration = mailConfig
    		
    'mail.from = Right(request.servervariables("logon_user"),Len(request.servervariables("logon_user"))-4) & "@wart.co.nz"
    mail.from = "news@ct.co.nz"
    mail.To = "users@wart.co.nz"
    mail.subject = "NEWS: " & request("header")
    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  
    mail.send
  • danp129
    Recognized Expert Contributor
    • Jul 2006
    • 323

    #2
    You will need to authenticate with the server. Look at the examples that have "senduserna me" specified on this page:
    http://www.paulsadowski.com/wsh/cdo.htm

    Comment

    Working...