//  home   //  advanced search   //  news   //  categories   //  sql build chart   //  downloads   //  statistics
 ASP FAQ 
Home
ASP FAQ Tutorials

   8000XXXX Errors
   Alerts
   ASP.NET 2.0
   Classic ASP 1.0
      COM / ActiveX Components
      Forms
      General Topics
      Date/Time Routines
      Email Scripts & Info
      Files/Directories & FSO
   Databases
   General Concepts
   Search Engine Optimization (SEO)

Contact Us
Site Map

Search

Web
aspfaq.com
tutorials.aspfaq.com
classicasp.aspfaq.com

ASP FAQ Tutorials :: Classic ASP 1.0 :: Email Scripts & Info :: Can I use a remote SMTP server with CDONTS.NewMail?


Can I use a remote SMTP server with CDONTS.NewMail?

CDONTS.NewMail only supports local smtp servers, so you can't set up a remote server to handle your mail from this object. If you are unable or unwilling to configure the web server to support outgoing SMTP mail, you will need to use another product (you're going to have to migrate from CDONTS anyway, since it has been deprecated and no longer ships with Windows XP or Windows Server 2003). In Windows 2000 and above, you can use CDO.Message as follows: 
 
<!--  
    METADATA  
    TYPE="typelib"  
    UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"  
    NAME="CDO for Windows 2000 Library"  
-->  
<%  
    Set cdoConfig = CreateObject("CDO.Configuration")  
 
    With cdoConfig.Fields  
        .Item(cdoSendUsingMethod) = cdoSendUsingPort  
        .Item(cdoSMTPServer) = "<enter_mail.server_here>"  
        .Update  
    End With  
 
    Set cdoMessage = CreateObject("CDO.Message")  
 
    With cdoMessage  
        Set .Configuration = cdoConfig  
        .From = "from@me.com"  
        .To = "to@me.com"  
        .Subject = "Sample CDO Message"  
        .TextBody = "This is a test for CDO.message"  
        .Send  
    End With  
 
    Set cdoMessage = Nothing  
    Set cdoConfig = Nothing  
%>
 
See Article #2026 for several more CDO.Message code samples, techniques and troubleshooting information. 
 
If you don't have access to CDO.Message (e.g. running NT 4.0), see Article #2119 for a list of 3rd party COM objects that you can use instead. Most 3rd party mailing components support remote SMTP servers.

Related Articles

Can I get CDO messages to return a read receipt?
How do I alter the priority / importance of an e-mail message?
How do I prevent my links from wrapping in an e-mail?
How do I put carriage returns into an e-mail?
How do I send e-mail from ASP?
How do I send e-mail from SQL Server?
How do I send e-mail in HTML format?
How do I send e-mail with CDO?
How do I validate an e-mail address?
Should I use form action=mailto: to mail the results of a form?
Where can I get more details about configuring / using CDO?
Why can't ASP handle 80,000 e-mails?
Why do CDONTS messages end up in the badmail folder?
Why do I get 8000900F errors?
Why do I get 80040108 errors?
Why do I get 8004020A errors?
Why do I get 80090020 errors?
Why do I get C00402CE / C00402C7 errors?
Why does CDO.Message give 800C000D errors?
Why does CDO.Message give me 8004020F errors?
Why does CDO.Message give me 80040213 errors?
Why does CDO.Message give me 80040222 errors?
Why does my CDONTS mail hang out in the queue or pickup folders?
Why is e-mail to certain domains being rejected?

 

 


Created: 7/30/2002 | Last Updated: 8/12/2004 | broken links | helpful | not helpful | statistics
© Copyright 2006, UBR, Inc. All Rights Reserved. (342)

 

Copyright 1999-2006, All rights reserved.
Finding content
Finding content.  An error has occured...