SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,746
    Mentioned
    45 Post(s)
    Tagged
    0 Thread(s)

    Could Someone Translate This to CDONY's Please??

    Hi there.

    I have this thing below in CDONT's. Can someone translate the equivalent into CDONY's please??


    Code:
    <%
    Set MailVar=Server.CreateObject("CDONTS.NewMail")
    
    MailVar.mailformat=0
    MailVar.to="web@****.com"
    MailVar.from="mailer@****.com"
    MailVar.subject="Add the following address to **** Mailing List..." & request.form("ViewerAddress")
    
    MailVar.bodyformat=0
    BodyVar=request.form("ViewerAddress")
    MailVar.body=BodyVar
    
    MailVar.send
    
    Set MailVar=nothing
    %>
    Many thanks!!

  2. #2
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,629
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    WTF is CDONY's other than a typo of CDONTS?
    Ian Anderson
    www.siteguru.co.uk

  3. #3
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,746
    Mentioned
    45 Post(s)
    Tagged
    0 Thread(s)
    CDONY's are the successors of CDONT's.

    That e-mail is not being sent so I think that the CDONT has stopped working on the server and we need to use that
    ^ as a CDONY instead.

  4. #4
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,746
    Mentioned
    45 Post(s)
    Tagged
    0 Thread(s)
    Edit:

    eek!!... CDOSY, sorry... heh heh

  5. #5
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,629
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Something along the lines of ...

    Code:
      Const cdoSendUsingMethod        = _
    	"http://schemas.microsoft.com/cdo/configuration/sendusing"
      Const cdoSendUsingPort          = 2
      Const cdoSMTPServer             = _
    	"http://schemas.microsoft.com/cdo/configuration/smtpserver"
      Const cdoSMTPServerPort         = _
    	"http://schemas.microsoft.com/cdo/configuration/smtpserverport"
      Const cdoSMTPConnectionTimeout  = _
    	"http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
      Const cdoSMTPAuthenticate       = _
    	"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
      Const cdoBasic                  = 1
      Const cdoSendUserName           = _
    	"http://schemas.microsoft.com/cdo/configuration/sendusername"
      Const cdoSendPassword           = _
    	"http://schemas.microsoft.com/cdo/configuration/sendpassword"
    
      Dim objConfig  ' As CDO.Configuration
      Dim objMessage ' As CDO.Message
      Dim Fields     ' As ADODB.Fields
    
    '   Get a handle on the config object and it's fields
      Set objConfig = Server.CreateObject("CDO.Configuration")
      Set Fields = objConfig.Fields
    
    '   Set config fields we care about
      With Fields
    	.Item(cdoSendUsingMethod)       = cdoSendUsingPort
    	.Item(cdoSMTPServer)            = "YourSMTPMailServer"
    	.Item(cdoSMTPServerPort)        = 25
    	.Item(cdoSMTPConnectionTimeout) = 10
    	.Item(cdoSMTPAuthenticate)      = cdoBasic
    	.Item(cdoSendUserName)          = "YourSMTPMailServerUserName"
    	.Item(cdoSendPassword)          = "YourSMTPMailServerPassword"
    
    	.Update
      End With
    
      Set objMessage = Server.CreateObject("CDO.Message")
    
      Set objMessage.Configuration = objConfig
    
      With objMessage
    	.To       = "to@somewhere.com"
    	.From     = "You <you@here.com>"
    	.Cc       = "him@somewhere.com"
    	.Subject  = "This is a subject"
    	.TextBody = "This is a message"
    	.Send
      End With
    
      Set Fields = Nothing
      Set objMessage = Nothing
      Set objConfig = Nothing
    Ian Anderson
    www.siteguru.co.uk

  6. #6
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,746
    Mentioned
    45 Post(s)
    Tagged
    0 Thread(s)
    Outstanding.

    Thanks a lot, dude.

  7. #7
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,746
    Mentioned
    45 Post(s)
    Tagged
    0 Thread(s)
    Okay, I'm getting...

    CDO.Message.1 error '80040213'

    The transport failed to connect to the server.

    /joinlist.asp, line 85
    Line 85 is the line that says " .Send". This is a server problem isn't it ??

  8. #8
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,629
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    It might mean your SMTP server, user or password details are wrong in your script.

    It might also mean that the server running this script might not have permissions to access the specified SMTP server.
    Ian Anderson
    www.siteguru.co.uk

  9. #9
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,746
    Mentioned
    45 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by siteguru
    It might mean your SMTP server, user or password details are wrong in your script.

    Ah... okay my mistake, I didn't notice all that was in the script.

    Many thanks, siteguru.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •