| BOOL SetDeliveryOptions( | 
             
            
              |   | 
              DWORD dwOptions | 
                | 
             
            
              | ); | 
             
           
         
        
          The SetDeliveryOptions method sets the delivery status
          notification options for the current session. 
         
        Parameters
        
          
            - dwOptions
 
            - A bitmask that defines the current delivery options. This value
            is created by combining one or more of the following constants with
            a bitwise Or operator:
 
           
         
        
          
            
              
                | Constant | 
                Description | 
               
              
                | SMTP_NOTIFY_NEVER | 
                Never return information about the success or failure of
                the message delivery process. | 
               
              
                | SMTP_NOTIFY_SUCCESS | 
                Return a message to the sender if the message has been
                successfully delivered to the recipient's mail server. | 
               
              
                | SMTP_NOTIFY_FAILURE | 
                Return a message to the sender if the message could not be
                delivered to the recipient's mail server. | 
               
              
                | SMTP_NOTIFY_DELAY | 
                Return a message to the sender if delivery of the message
                was delayed. | 
               
              
                | SMTP_RETURN_HEADERS | 
                Return only the message headers to the sender. | 
               
              
                | SMTP_RETURN_MESSAGE | 
                Return the complete message headers and body to the
                sender. | 
               
             
           
         
        Return Value
        
          If the method succeeds, the return value is a non-zero value. If
          the method fails, the return value is zero. To get extended error
          information, call GetLastError. 
         
        Remarks
        
          The SetDeliveryOptions method sets the current delivery
          options for the client session. Note that delivery options are only
          available on those mail servers which support delivery status
          notification (DSN) using the extended SMTP protocol. The client must
          connect specifying SMTP_OPTION_EXTENDED in order to use extended
          server options. 
         
        Requirements
        
          Minimum Desktop Platform: Windows 7 (Service Pack 1)
           
          Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
           
          Header File: cstools10.h
           
          Import Library: csmtpv10.lib
           
          Unicode: Implemented as Unicode and ANSI versions. 
         
        See Also
        
          GetDeliveryOptions, 
          GetExtendedOptions 
         
       |