Email from ASP - Using external smtp server and CDO
ActiveX RegEdit.   ActiveX User account Manager   Pure-ASP Upload
Export MDB/DBF from ASP   Active LogFile   WebChecker   ActiveX/ASP Multi Dictionary object
 See 
 also 
 IISTracer, real-time IIS monitor and logging tool.
 Huge ASP file upload with progress bar. 



Do you like this article?
Please, rate it
and write review!
Rated:
by Aspin.com users
What do you think?
 Top messages
 22.3.2003 19:18:41 
 Read and write SQL image data, store binary file to sql table. (nbsp;WSHDatabaseConversionVBScript)
 4.5.2002 9:16:43 
 Send an email from ASP (WSH) using VBSscript, CDONTS and Outlook. (nbsp;ASP / ASP.NetWSHVBScriptEmail)
 12.6.2003 9:14:29 
 Download multiple files in one http request (nbsp;File & data transferVBScript)

 Email from ASP - Using external smtp server and CDO 

 Areas>WSH
 Areas>ASP / ASP.Net
 Areas>ASP / ASP.Net>Email
 Areas>Languages>VBScript
      Next simple function let's you send an email from ASP or WSH using CDO.Message object (cdosys.dll, Microsoft CDO for Windows 2000 Library). You can specify any public or private SMTP server (against of CDONTS.NewMail object).
Const cdoSendUsingPickup = 1
Const cdoSendUsingPort = 2
Const cdoSendUsingExchange = 3

Const cdoAnonymous = 0
Const cdoBasic = 1
Const cdoNTLM = 2

'Sends an email To aTo email address, with Subject And TextBody.
'The email is In text format.
'Lets you specify BCC adresses, Attachments, smtp server And Sender email address
Function SendMailByCDO(aTo, Subject, TextBody, BCC, Files, smtp, aFrom )
  on error resume Next

  Dim Message 'As New CDO.Message '(New - For VBA)
  
  'Create CDO message object
  Set Message = CreateObject("CDO.Message")

  'Set configuration fields. 
  With Message.Configuration.Fields
    'Original sender email address 
    .Item("http://schemas.microsoft.com/cdo/configuration/sendemailaddress") = aFrom

    'SMTP settings - without authentication, using standard port 25 on host smtp
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtp

    'SMTP Authentication
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoAnonymous

    .Update
  End With

  'Set other message fields.
  With Message
    'From, To, Subject And Body are required.
    .From = aFrom
    .To = aTo
    .Subject = Subject

    'Set TextBody property If you want To send the email As plain text
    .TextBody = TextBody

    'Set HTMLBody  property If you want To send the email As an HTML formatted
    '.HTMLBody = TextBody

    'Blind copy And attachments are optional.
    If Len(BCC)>0 Then .BCC = BCC
    If Len(Files)>0 Then .AddAttachment Files
    
    'Send the email
    .Send
  End With

  'Returns zero If succesfull. Error code otherwise 
  SendMailByCDO = Err.Number
End Function

      You can create short support function with specified sender and smtp server to use, or directly send email with the function

'Send one email with two BCC addresses And file attachment
'using smtp.mycompany.To
SendMail "someone@domain.com", "Subject of the message", "Some interesting plain text body", _
 "second@domain.com;third@domain.com", "e:\attachments\file.ext"

Function SendMail(ByVal aTo, ByVal Subject, ByVal TextBody, ByVal BCC, byref Files )
  Const smtp = "smtp.mycompany.to"
  Const aFrom = "MyCompany <info@mycompany.to>"
  SendMail = SendMailByCDO(aTo, Subject, TextBody, BCC, Files, smtp, aFrom )
End Function


      You can also specify authentication properties for the smtp session using smtpauthenticate and sendusername + sendpassword:
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "info@mycompany.to"
    .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
    '.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True/False


Library CDO - COM interface listing

ContainingFile: C:\WINDOWS\system32\cdosys.dll
GUID: {CD000000-8B95-11D1-82DB-00C04FB1625D}
HelpString: Microsoft CDO for Windows 2000 Library
Classes:

Class Message

GUID: {CD000001-8B95-11D1-82DB-00C04FB1625D}
HelpString: Defines an object used to manage a message.
Interfaces:

Interface IMessage

GUID: {CD000020-8B95-11D1-82DB-00C04FB1625D}
HelpString: Defines methods, properties, and collections used to manage a message.
Members:
  • Sub QueryInterface(riid as GUID, ppvObj as Void)
  • Function AddRef as VT_UI4
  • Function Release as VT_UI4
  • Sub GetTypeInfoCount(pctinfo as VT_UINT)
  • Sub GetTypeInfo(itinfo as VT_UINT, lcid as VT_UI4, pptinfo as Void)
  • Sub GetIDsOfNames(riid as GUID, rgszNames as VT_I1, cNames as VT_UINT, lcid as VT_UI4, rgdispid as Long)
  • Sub Invoke(dispidMember as Long, riid as GUID, lcid as VT_UI4, wFlags as VT_UI2, pdispparams as DISPPARAMS, pvarResult as Variant, pexcepinfo as EXCEPINFO, puArgErr as VT_UINT)
  • Property Get BCC as String [The message's hidden carbon copy (BCC header) recipients.]
  • Property Put BCC as String [The message's hidden carbon copy (BCC header) recipients.]
  • Property Get CC as String [The message's secondary (CC header) recipients.]
  • Property Put CC as String [The message's secondary (CC header) recipients.]
  • Property Get FollowUpTo as String [The message's follow-up recipients.]
  • Property Put FollowUpTo as String [The message's follow-up recipients.]
  • Property Get From as String [The message's principle (From header) authors.]
  • Property Put From as String [The message's principle (From header) authors.]
  • Property Get Keywords as String [The message's keywords.]
  • Property Put Keywords as String [The message's keywords.]
  • Property Get MimeFormatted as Boolean [Indicates whether the message is to be serialized using the MIME (True) or UUENCODE (False) format.]
  • Property Put MimeFormatted as Boolean [Indicates whether the message is to be serialized using the MIME (True) or UUENCODE (False) format.]
  • Property Get Newsgroups as String [The message's newsgroup (Newsgroups header) recipients.]
  • Property Put Newsgroups as String [The message's newsgroup (Newsgroups header) recipients.]
  • Property Get Organization as String [The sender's organization name.]
  • Property Put Organization as String [The sender's organization name.]
  • Property Get ReceivedTime as Date [The date and time the message was received.]
  • Property Get ReplyTo as String [The email addresses (Reply-To header) to which to reply.]
  • Property Put ReplyTo as String [The email addresses (Reply-To header) to which to reply.]
  • Property Get DSNOptions as CdoDSNOptions [The delivery status notification (DSN) options for the message.]
  • Property Put DSNOptions as CdoDSNOptions [The delivery status notification (DSN) options for the message.]
  • Property Get SentOn as Date [The date and time the message was sent.]
  • Property Get Subject as String [The message's subject (Subject header).]
  • Property Put Subject as String [The message's subject (Subject header).]
  • Property Get To as String [The message's principle (To header) recipients.]
  • Property Put To as String [The message's principle (To header) recipients.]
  • Property Get TextBody as String [The text/plain portion of the message body.]
  • Property Put TextBody as String [The text/plain portion of the message body.]
  • Property Get HTMLBody as String [The text/html portion of the message body.]
  • Property Put HTMLBody as String [The text/html portion of the message body.]
  • Property Get Attachments as IBodyParts [The object's Attachments collection.]
  • Property Get Sender as String [The message's actual sender.]
  • Property Put Sender as String [The message's actual sender.]
  • Property Get Configuration as IConfiguration [The object's Configuration object.]
  • Property Put Configuration as IConfiguration [The object's Configuration object.]
  • Function Configuration as IConfiguration [The object's Configuration object.]
  • Property Get AutoGenerateTextBody as Boolean [Indicates whether a text/plain alternate representation should automatically be generated from the text/html part of the message body.]
  • Property Put AutoGenerateTextBody as Boolean [Indicates whether a text/plain alternate representation should automatically be generated from the text/html part of the message body.]
  • Property Get EnvelopeFields as Fields [The transport envelope Fields collection for the message (transport event sinks only).]
  • Property Get TextBodyPart as IBodyPart [Returns the BodyPart object (IBodyPart interface) containing the text/plain part of the message body.]
  • Property Get HTMLBodyPart as IBodyPart [Returns the BodyPart object (IBodyPart interface) containing the text/html portion of the message body.]
  • Property Get BodyPart as IBodyPart [The object's IBodyPart interface.]
  • Property Get DataSource as IDataSource [The object's IDataSource interface.]
  • Property Get Fields as Fields [The object's Fields collection.]
  • Property Get MDNRequested as Boolean [Indicates whether a mail delivery notification (MDN) should be sent when the message is received.]
  • Property Put MDNRequested as Boolean [Indicates whether a mail delivery notification (MDN) should be sent when the message is received.]
  • Function AddRelatedBodyPart(URL as String, Reference as String, ReferenceType as CdoReferenceType, UserName as String, Password as String) as IBodyPart [Adds a BodyPart object with content referenced within the text/html portion of the message body.]
  • Function AddAttachment(URL as String, UserName as String, Password as String) as IBodyPart [Adds an attachment (BodyPart) to the message.]
  • Sub CreateMHTMLBody(URL as String, Flags as CdoMHTMLFlags, UserName as String, Password as String) [Creates an MHTML-formatted message body using the resource(s) at the specified URL.]
  • Function Forward as IMessage [Returns a Message object used to forward a message.]
  • Sub Post [Posts the message using the method specified in the associated Configuration object.]
  • Function PostReply as IMessage [Returns a Message object used to post a reply to the message.]
  • Function Reply as IMessage [Returns a Message object used to reply to the message.]
  • Function ReplyAll as IMessage [Returns a Message object used to post a reply to all recipients of the message.]
  • Sub Send [Sends the message using the method specified in the associated Configuration object.]
  • Function GetStream as _Stream [Returns an ADO Stream object containing the message in serialized, RFC 822 format. The message body is encoded using either MIME or UUENCODE as specified by the MIMEFormatted property.]
  • Function GetInterface(Interface as String) as VT_DISPATCH [Returns a specified interface on this object; provided for script languages.]
  • Interface IDataSource

    GUID: {CD000029-8B95-11D1-82DB-00C04FB1625D}
    HelpString: Defines methods, properties, and collections used to extract messages from or embed messages into other CDO message body parts.
    Members:
  • Sub QueryInterface(riid as GUID, ppvObj as Void)
  • Function AddRef as VT_UI4
  • Function Release as VT_UI4
  • Sub GetTypeInfoCount(pctinfo as VT_UINT)
  • Sub GetTypeInfo(itinfo as VT_UINT, lcid as VT_UI4, pptinfo as Void)
  • Sub GetIDsOfNames(riid as GUID, rgszNames as VT_I1, cNames as VT_UINT, lcid as VT_UI4, rgdispid as Long)
  • Sub Invoke(dispidMember as Long, riid as GUID, lcid as VT_UI4, wFlags as VT_UI2, pdispparams as DISPPARAMS, pvarResult as Variant, pexcepinfo as EXCEPINFO, puArgErr as VT_UINT)
  • Property Get SourceClass as String [The interface name (type) of the currently bound object. When you bind resources by URL, the value _Record is returned.]
  • Property Get Source as VT_UNKNOWN [Returns the currently bound object. When you bind resources by URL, an ADO _Record interface is returned on an open Record object.]
  • Property Get IsDirty as Boolean [Indicates whether the local data has been changed since the last save or bind operation.]
  • Property Put IsDirty as Boolean [Indicates whether the local data has been changed since the last save or bind operation.]
  • Property Get SourceURL as String [Not Implemented. Reserved for future use.]
  • Property Get ActiveConnection as _Connection [Not implemented. Reserved for future use.]
  • Sub SaveToObject(Source as VT_UNKNOWN, InterfaceName as String) [Binds to and saves data into the specified object.]
  • Sub OpenObject(Source as VT_UNKNOWN, InterfaceName as String) [Binds to and opens data from the specified object.]
  • Sub SaveTo(SourceURL as String, ActiveConnection as VT_DISPATCH, Mode as ConnectModeEnum, CreateOptions as RecordCreateOptionsEnum, Options as RecordOpenOptionsEnum, UserName as String, Password as String) [Not implemented. Reserved for future use.]
  • Sub Open(SourceURL as String, ActiveConnection as VT_DISPATCH, Mode as ConnectModeEnum, CreateOptions as RecordCreateOptionsEnum, Options as RecordOpenOptionsEnum, UserName as String, Password as String) [Not implemented. Reserved for future use.]
  • Sub Save [Saves data into the currently bound object.]
  • Sub SaveToContainer(ContainerURL as String, ActiveConnection as VT_DISPATCH, Mode as ConnectModeEnum, CreateOptions as RecordCreateOptionsEnum, Options as RecordOpenOptionsEnum, UserName as String, Password as String) [Not implemented. Reserved for future use.]
  • Interface IBodyPart

    GUID: {CD000021-8B95-11D1-82DB-00C04FB1625D}
    HelpString: Defines methods, properties, and collections used to manage a message body part.
    Members:
  • Sub QueryInterface(riid as GUID, ppvObj as Void)
  • Function AddRef as VT_UI4
  • Function Release as VT_UI4
  • Sub GetTypeInfoCount(pctinfo as VT_UINT)
  • Sub GetTypeInfo(itinfo as VT_UINT, lcid as VT_UI4, pptinfo as Void)
  • Sub GetIDsOfNames(riid as GUID, rgszNames as VT_I1, cNames as VT_UINT, lcid as VT_UI4, rgdispid as Long)
  • Sub Invoke(dispidMember as Long, riid as GUID, lcid as VT_UI4, wFlags as VT_UI2, pdispparams as DISPPARAMS, pvarResult as Variant, pexcepinfo as EXCEPINFO, puArgErr as VT_UINT)
  • Property Get BodyParts as IBodyParts [The object's BodyParts collection.]
  • Property Get ContentTransferEncoding as String [The method used to encode the body part content. For example, quoted-printable or base64.]
  • Property Put ContentTransferEncoding as String [The method used to encode the body part content. For example, quoted-printable or base64.]
  • Property Get ContentMediaType as String [The content media type portion of the body part's content type.]
  • Property Put ContentMediaType as String [The content media type portion of the body part's content type.]
  • Property Get Fields as Fields [The object's Fields collection.]
  • Property Get Charset as String [The character set of the body part's text content (not applicable for non-text content types).]
  • Property Put Charset as String [The character set of the body part's text content (not applicable for non-text content types).]
  • Property Get FileName as String [The value of the filename parameter for the content-disposition MIME header.]
  • Property Get DataSource as IDataSource [The object's IDataSource interface.]
  • Property Get ContentClass as String [The body part's content class.]
  • Property Put ContentClass as String [The body part's content class.]
  • Property Get ContentClassName as String [Deprecated. Do not use.]
  • Property Put ContentClassName as String [Deprecated. Do not use.]
  • Property Get Parent as IBodyPart [The object's parent object in the body part hierarchy.]
  • Function AddBodyPart(Index as Long) as IBodyPart [Adds a body part to the object's BodyParts collection.]
  • Sub SaveToFile(FileName as String) [Saves the body part content to the specified file.]
  • Function GetEncodedContentStream as _Stream [Returns a Stream object containing the body part content in encoded format. The encoding method is specified in the ContentTransferEncoding property.]
  • Function GetDecodedContentStream as _Stream [Returns a Stream object containing the body part content in decoded format.]
  • Function GetStream as _Stream [Returns an ADO Stream object containing the body part in serialized, MIME encoded format.]
  • Function GetFieldParameter(FieldName as String, Parameter as String) as String [Returns the specified parameter from the body part's specified header field.]
  • Function GetInterface(Interface as String) as VT_DISPATCH [Returns a specified interface on this object; provided for script languages.]
  • Class Configuration

    GUID: {CD000002-8B95-11D1-82DB-00C04FB1625D}
    HelpString: Defines an object used to store configuration information for CDO objects.
    Interfaces:

    Interface IConfiguration

    GUID: {CD000022-8B95-11D1-82DB-00C04FB1625D}
    HelpString: Defines methods, properties, and collections used to manage configuration information for CDO objects.
    Members:
  • Sub QueryInterface(riid as GUID, ppvObj as Void)
  • Function AddRef as VT_UI4
  • Function Release as VT_UI4
  • Sub GetTypeInfoCount(pctinfo as VT_UINT)
  • Sub GetTypeInfo(itinfo as VT_UINT, lcid as VT_UI4, pptinfo as Void)
  • Sub GetIDsOfNames(riid as GUID, rgszNames as VT_I1, cNames as VT_UINT, lcid as VT_UI4, rgdispid as Long)
  • Sub Invoke(dispidMember as Long, riid as GUID, lcid as VT_UI4, wFlags as VT_UI2, pdispparams as DISPPARAMS, pvarResult as Variant, pexcepinfo as EXCEPINFO, puArgErr as VT_UINT)
  • Property Get Fields as Fields [The object's Fields collection.]
  • Sub Load(LoadFrom as CdoConfigSource, URL as String) [Loads the specified configuration.]
  • Function GetInterface(Interface as String) as VT_DISPATCH [Returns a specified interface on this object; provided for script languages.]
  • Class DropDirectory

    GUID: {CD000004-8B95-11D1-82DB-00C04FB1625D}
    HelpString: Defines an object used to access messages located on the file system.
    Interfaces:

    Interface IDropDirectory

    GUID: {CD000024-8B95-11D1-82DB-00C04FB1625D}
    HelpString: Defines methods, properties, and collections used to manage a collection of messages on the file system.
    Members:
  • Sub QueryInterface(riid as GUID, ppvObj as Void)
  • Function AddRef as VT_UI4
  • Function Release as VT_UI4
  • Sub GetTypeInfoCount(pctinfo as VT_UINT)
  • Sub GetTypeInfo(itinfo as VT_UINT, lcid as VT_UI4, pptinfo as Void)
  • Sub GetIDsOfNames(riid as GUID, rgszNames as VT_I1, cNames as VT_UINT, lcid as VT_UI4, rgdispid as Long)
  • Sub Invoke(dispidMember as Long, riid as GUID, lcid as VT_UI4, wFlags as VT_UI2, pdispparams as DISPPARAMS, pvarResult as Variant, pexcepinfo as EXCEPINFO, puArgErr as VT_UINT)
  • Function GetMessages(DirName as String) as IMessages [Returns a collection of messages contained in the specified directory on the file system. The default location is the SMTP drop directory.]
  • Class SMTPConnector

    GUID: {CD000008-8B95-11D1-82DB-00C04FB1625D}
    HelpString: SMTPConnector Class
    Interfaces:

    Interface ISMTPScriptConnector

    GUID: {CD000030-8B95-11D1-82DB-00C04FB1625D}
    HelpString: ISMTPScriptConnector interface
    Members:
  • Sub QueryInterface(riid as GUID, ppvObj as Void)
  • Function AddRef as VT_UI4
  • Function Release as VT_UI4
  • Sub GetTypeInfoCount(pctinfo as VT_UINT)
  • Sub GetTypeInfo(itinfo as VT_UINT, lcid as VT_UI4, pptinfo as Void)
  • Sub GetIDsOfNames(riid as GUID, rgszNames as VT_I1, cNames as VT_UINT, lcid as VT_UI4, rgdispid as Long)
  • Sub Invoke(dispidMember as Long, riid as GUID, lcid as VT_UI4, wFlags as VT_UI2, pdispparams as DISPPARAMS, pvarResult as Variant, pexcepinfo as EXCEPINFO, puArgErr as VT_UINT)
  • Interface ISMTPOnArrival

    GUID: {CD000026-8B95-11D1-82DB-00C04FB1625D}
    HelpString: Implement when creating SMTP OnArrival event sinks.
    Members:
  • Sub QueryInterface(riid as GUID, ppvObj as Void)
  • Function AddRef as VT_UI4
  • Function Release as VT_UI4
  • Sub GetTypeInfoCount(pctinfo as VT_UINT)
  • Sub GetTypeInfo(itinfo as VT_UINT, lcid as VT_UI4, pptinfo as Void)
  • Sub GetIDsOfNames(riid as GUID, rgszNames as VT_I1, cNames as VT_UINT, lcid as VT_UI4, rgdispid as Long)
  • Sub Invoke(dispidMember as Long, riid as GUID, lcid as VT_UI4, wFlags as VT_UI2, pdispparams as DISPPARAMS, pvarResult as Variant, pexcepinfo as EXCEPINFO, puArgErr as VT_UINT)
  • Sub OnArrival(Msg as IMessage, EventStatus as CdoEventStatus) [Called by the SMTP event dispatcher when a message arrives.]
  • Class NNTPEarlyConnector

    GUID: {CD000011-8B95-11D1-82DB-00C04FB1625D}
    HelpString: NNTPEarlyConnector Class
    Interfaces:

    Interface INNTPEarlyScriptConnector

    GUID: {CD000034-8B95-11D1-82DB-00C04FB1625D}
    HelpString: INNTPFinalScriptConnector interface
    Members:
  • Sub QueryInterface(riid as GUID, ppvObj as Void)
  • Function AddRef as VT_UI4
  • Function Release as VT_UI4
  • Sub GetTypeInfoCount(pctinfo as VT_UINT)
  • Sub GetTypeInfo(itinfo as VT_UINT, lcid as VT_UI4, pptinfo as Void)
  • Sub GetIDsOfNames(riid as GUID, rgszNames as VT_I1, cNames as VT_UINT, lcid as VT_UI4, rgdispid as Long)
  • Sub Invoke(dispidMember as Long, riid as GUID, lcid as VT_UI4, wFlags as VT_UI2, pdispparams as DISPPARAMS, pvarResult as Variant, pexcepinfo as EXCEPINFO, puArgErr as VT_UINT)
  • Interface INNTPOnPostEarly

    GUID: {CD000033-8B95-11D1-82DB-00C04FB1625D}
    HelpString: Implement when creating NNTP OnPostEarly event sinks.
    Members:
  • Sub QueryInterface(riid as GUID, ppvObj as Void)
  • Function AddRef as VT_UI4
  • Function Release as VT_UI4
  • Sub GetTypeInfoCount(pctinfo as VT_UINT)
  • Sub GetTypeInfo(itinfo as VT_UINT, lcid as VT_UI4, pptinfo as Void)
  • Sub GetIDsOfNames(riid as GUID, rgszNames as VT_I1, cNames as VT_UINT, lcid as VT_UI4, rgdispid as Long)
  • Sub Invoke(dispidMember as Long, riid as GUID, lcid as VT_UI4, wFlags as VT_UI2, pdispparams as DISPPARAMS, pvarResult as Variant, pexcepinfo as EXCEPINFO, puArgErr as VT_UINT)
  • Sub OnPostEarly(Msg as IMessage, EventStatus as CdoEventStatus) [Called by the NNTP event dispatcher when message headers arrive.]
  • Class NNTPPostConnector

    GUID: {CD000009-8B95-11D1-82DB-00C04FB1625D}
    HelpString: NNTPPostConnector Class
    Interfaces:

    Interface INNTPPostScriptConnector

    GUID: {CD000031-8B95-11D1-82DB-00C04FB1625D}
    HelpString: INNTPPostScriptConnector interface
    Members:
  • Sub QueryInterface(riid as GUID, ppvObj as Void)
  • Function AddRef as VT_UI4
  • Function Release as VT_UI4
  • Sub GetTypeInfoCount(pctinfo as VT_UINT)
  • Sub GetTypeInfo(itinfo as VT_UINT, lcid as VT_UI4, pptinfo as Void)
  • Sub GetIDsOfNames(riid as GUID, rgszNames as VT_I1, cNames as VT_UINT, lcid as VT_UI4, rgdispid as Long)
  • Sub Invoke(dispidMember as Long, riid as GUID, lcid as VT_UI4, wFlags as VT_UI2, pdispparams as DISPPARAMS, pvarResult as Variant, pexcepinfo as EXCEPINFO, puArgErr as VT_UINT)
  • Interface INNTPOnPost

    GUID: {CD000027-8B95-11D1-82DB-00C04FB1625D}
    HelpString: Implement when creating NNTP OnPost event sinks.
    Members:
  • Sub QueryInterface(riid as GUID, ppvObj as Void)
  • Function AddRef as VT_UI4
  • Function Release as VT_UI4
  • Sub GetTypeInfoCount(pctinfo as VT_UINT)
  • Sub GetTypeInfo(itinfo as VT_UINT, lcid as VT_UI4, pptinfo as Void)
  • Sub GetIDsOfNames(riid as GUID, rgszNames as VT_I1, cNames as VT_UINT, lcid as VT_UI4, rgdispid as Long)
  • Sub Invoke(dispidMember as Long, riid as GUID, lcid as VT_UI4, wFlags as VT_UI2, pdispparams as DISPPARAMS, pvarResult as Variant, pexcepinfo as EXCEPINFO, puArgErr as VT_UINT)
  • Sub OnPost(Msg as IMessage, EventStatus as CdoEventStatus) [Called by the NNTP event dispatcher when a message is posted.]
  • Class NNTPFinalConnector

    GUID: {CD000010-8B95-11D1-82DB-00C04FB1625D}
    HelpString: NNTPFinalConnector Class
    Interfaces:

    Interface INNTPFinalScriptConnector

    GUID: {CD000032-8B95-11D1-82DB-00C04FB1625D}
    HelpString: INNTPFinalScriptConnector interface
    Members:
  • Sub QueryInterface(riid as GUID, ppvObj as Void)
  • Function AddRef as VT_UI4
  • Function Release as VT_UI4
  • Sub GetTypeInfoCount(pctinfo as VT_UINT)
  • Sub GetTypeInfo(itinfo as VT_UINT, lcid as VT_UI4, pptinfo as Void)
  • Sub GetIDsOfNames(riid as GUID, rgszNames as VT_I1, cNames as VT_UINT, lcid as VT_UI4, rgdispid as Long)
  • Sub Invoke(dispidMember as Long, riid as GUID, lcid as VT_UI4, wFlags as VT_UI2, pdispparams as DISPPARAMS, pvarResult as Variant, pexcepinfo as EXCEPINFO, puArgErr as VT_UINT)
  • Interface INNTPOnPostFinal

    GUID: {CD000028-8B95-11D1-82DB-00C04FB1625D}
    HelpString: Implement when creating NNTP OnPostFinal event sinks.
    Members:
  • Sub QueryInterface(riid as GUID, ppvObj as Void)
  • Function AddRef as VT_UI4
  • Function Release as VT_UI4
  • Sub GetTypeInfoCount(pctinfo as VT_UINT)
  • Sub GetTypeInfo(itinfo as VT_UINT, lcid as VT_UI4, pptinfo as Void)
  • Sub GetIDsOfNames(riid as GUID, rgszNames as VT_I1, cNames as VT_UINT, lcid as VT_UI4, rgdispid as Long)
  • Sub Invoke(dispidMember as Long, riid as GUID, lcid as VT_UI4, wFlags as VT_UI2, pdispparams as DISPPARAMS, pvarResult as Variant, pexcepinfo as EXCEPINFO, puArgErr as VT_UINT)
  • Sub OnPostFinal(Msg as IMessage, EventStatus as CdoEventStatus) [Called by the NNTP event dispatcher after a posted message has been saved to its final location.]
  •  
     

    See also for 'Email from ASP - Using external smtp server and CDO' article:

         Send an email from ASP (WSH) using VBSscript, CDONTS and Outlook. Short samples which lets you send an email from ASP or WSH, using several objects (CDONTS.NewMail, CDO.Message, Outlook.Application) and VBScript

    If you like this page, please include next link on your pages:
    
    
    

         IISTracer - IIS ISAPI real-time monitor IISTracer is a real-time monitoring tool for Microsoft IIS, which will show/log you what is happenning on IIS server right now. It let's you reveal problems with long-running scripts (.asp, .cgi, cfm...), hang-up states and low resource situations and lets you stop long-running requests (uploads/downloads).      ActiveX User account Manager - Set of simple objects for creating, deleting, and managing user accounts, groups, servers and domains in the Windows NT environment.
         Active log file - Hi-performance text file logging for ASP/VBS/VBA applications. Lets you create daily/weekly/monthly log files with variable number of logged values and extra timing and performance info.      ActiveX windows registry editor - Intuitive, easy to use COM interface to windows registry. Set of classes to read/enumerate/modify windows registry keys and values from ASP, VBS and T-SQL.
         ActiveX/ASP Multi Dictionary object - Free-threaded hi-speed dictionary algorithm with unique/nonunique keys (map/multimap). Connect to another dictionary object in the same process. Lock and Unlock methods to synchronize tasks (application scope). Share ASP Application/Session objects.      Export DBF/MDB from ASP - Conversion from recordset to MDB/DBF. Direct binary output of MDB or DBF files from ASP pages with one row of code.
         Pure-ASP upload - lets you upload files using Pure ASP VBS code (using multipart/form-data and input type=file).      ByteArray - Works with safearray binary data (VT_UI1 | VT_ARRAY) - save/restore binary data from disk, find, work with code pages, convert to string/hexstring(SQL).
         WebChecker - Checks http, https, ftp and gopher internet connections in regular intervals. Lets you monitor web site functionality (uptime). Enables restart or notification on problems.      HTTPLog ISAPI filter - Lets you log incomming/outgoing http header and document data to separate files. Monitor of IIS service input/output.

    © 1996 – 2010 Antonin Foller, PSTRUH Software, e-mail help@pstruh.cz