How do I send e-mails in my classic ASP v3 web applications?
Posted by Support, Last modified by Support on 23 July 2010 02:26 PM
To send e-mails using classic ASP on our Windows server, please use CDO as follows. CDONTS.NewMail only supports local smtp servers, so you can't set up a remote server to handle your e-mail from this object. And you're going to have to migrate away from CDONTS anyway, since it has been deprecated and no longer ships with Windows Server 2003 or Windows Server 2008. Please note the from e-mail address has to be a valid e-mail address on our e-mail servers. You can use CDO.Message as follows to send e-mails from our servers:

    NAME="CDO for Windows 2000 Library"  
    Set cdoConfig = Server.CreateObject("CDO.Configuration")  
    With cdoConfig.Fields  
        .Item(cdoSendUsingMethod) = 2
        .Item(cdoSMTPServerPort) = 25
        .Item(cdoSMTPServer) = ""  
    End With  
    Set cdoMessage = Server.CreateObject("CDO.Message")  
    With cdoMessage  
        Set .Configuration = cdoConfig  
        .From = ""  
        .To = ""  
        .Subject = "Sample CDO Message"  
        .TextBody = "This is a test for CDO.message"  
    End With  
    Set cdoMessage = Nothing  
    Set cdoConfig = Nothing  
(487 vote(s))
Not helpful

Comments (0)