<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from __future__ import division <EOL> from __future__ import print_function <EOL> import phlsys_subprocess <EOL> class Sendmail ( ) : <EOL> _default_binary = '<STR_LIT>' <EOL> _default_params = [ '<STR_LIT>' ] <EOL> @ classmethod <EOL> def set_default_binary ( cls , binary ) : <EOL> cls . _default_binary = binary <EOL> @ classmethod <EOL> def set_default_params_from_type ( cls , sendmail_type ) : <EOL> if "<STR_LIT>" == sendmail_type : <EOL> cls . _default_params = [ "<STR_LIT>" ] <EOL> elif "<STR_LIT>" == sendmail_type : <EOL> cls . _default_params = [ ] <EOL> else : <EOL> raise TypeError ( str ( sendmail_type ) + "<STR_LIT>" ) <EOL> def __init__ ( self , binary = None , params = None ) : <EOL> """<STR_LIT>""" <EOL> self . _binary = binary if binary is not None else self . _default_binary <EOL> self . _params = params if params is not None else self . _default_params <EOL> def send ( self , stdin ) : <EOL> result = phlsys_subprocess . run ( <EOL> self . _binary , * self . _params , stdin = stdin ) <EOL> return result . stdout </s>
