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:
    Set cdoConfig = CreateObject("CDO.Configuration")  
    With cdoConfig.Fields  
        .Item(cdoSendUsingMethod) = 2    'cdoSendUsingPort  
        .Item(cdoSMTPServer) = ""  
        .Item(cdoSMTPAuthenticate) = 1  
        .Item(cdoSendUsername) = "username"  
        .Item(cdoSendPassword) = "password"  
    End With 
    Set cdoMessage = CreateObject("CDO.Message")  
    With cdoMessage 
        Set .Configuration = cdoConfig 
        .From = "[email protected]" 
        .To = "[email protected]" 
        .Subject = "This is the subject of the email" 
        .TextBody = "This is a test for CDO.message with authentication" 
    End With 
    Set cdoMessage = Nothing  
    Set cdoConfig = Nothing