Recently a customer needed to use an external mail server to send email from a web page, using Authentication on the mail server. Here is some code that worked for that:
Code:
<%  
    Set cdoConfig = CreateObject("CDO.Configuration")  
 
    With cdoConfig.Fields  
        .Item(cdoSendUsingMethod) = 2    'cdoSendUsingPort  
        .Item(cdoSMTPServer) = "name_of_server.com"  
        .Item(cdoSMTPAuthenticate) = 1  
        .Item(cdoSendUsername) = "username"  
        .Item(cdoSendPassword) = "password"  
        .Update  
    End With 
 
    Set cdoMessage = CreateObject("CDO.Message")  
 
    With cdoMessage 
        Set .Configuration = cdoConfig 
        .From = "[email protected]_address.com" 
        .To = "[email protected]_address.com" 
        .Subject = "This is the subject of the email" 
        .TextBody = "This is a test for CDO.message with authentication" 
        .Send 
    End With 
 
    Set cdoMessage = Nothing  
    Set cdoConfig = Nothing  
%>