LimitedSmtp
class LimitedSmtp implements TransportInterface (View source)
Properties
| protected Smtp | $transport | The actual transport instance. | |
| protected int | $limit | Maximum number of messages to be sent for for every connection. | |
| protected int | $sent | Number of messages sent in current connection. | 
Methods
                    __construct(Smtp $transport, int $limit)
        
                                            
                
            Initializes the instance.
                    Smtp
                
                
                    getSmtpTransport()
        
                                            
                
            Get the actual transport instance.
                    send(Message $message)
        
                                            
                
            {@inheritdoc}
                    trackLimit()
        
                                            
                
            Increment the counter of sent messages and disconnect the underlying transport if needed.
Details
        
                            
    __construct(Smtp $transport, int $limit)
        
    
    Initializes the instance.
        
                            Smtp
    getSmtpTransport()
        
    
    Get the actual transport instance.
        
                            
    send(Message $message)
        
    
    {@inheritdoc}
        
                        private    
    trackLimit()
        
    
    Increment the counter of sent messages and disconnect the underlying transport if needed.