#NEWLINE# def email_me( status = 'ok' ) : #NEWLINE# #INDENT# if ( msg == 'ok' ) : #NEWLINE# #INDENT# message = '\n    HTML Documentation uploaded successfully.\n    ' #NEWLINE# subject = 'Statsmodels HTML Build OK' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# message = status #NEWLINE# subject = 'Statsmodels HTML Build Failed' #NEWLINE# #UNINDENT# msg = MIMEText ( message ) #NEWLINE# msg [ 'Subject' ] = subject #NEWLINE# msg [ 'From' ] = email_name #NEWLINE# msg [ 'To' ] = email_name #NEWLINE# server = smtplib . SMTP ( 'smtp.gmail.com' , 587 ) #NEWLINE# server . ehlo ( ) #NEWLINE# server . starttls ( ) #NEWLINE# server . ehlo ( ) #NEWLINE# server . login ( email_name , gmail_pwd ) #NEWLINE# server . sendmail ( email_name , to_email , msg . as_string ( ) ) #NEWLINE# server . close ( )