def send_external_email(subject, body): msg = MIMEText(body) msg['Subject'] = subject msg['From'] = behave_email() msg['To'] = behave_email() s = smtplib.SMTP(hostname) s.sendmail(behave_email(), [behave_email()], msg.as_string()) s.quit()
def send_external_email(subject, body): msg = MIMEText(body) msg['Subject'] = subject msg['From'] = behave_email() msg['To'] = behave_email() s = smtplib.SMTP('staging.pixelated-project.org') s.sendmail(behave_email(), [behave_email()], msg.as_string()) s.quit()
def step_impl(context): email_to = behave_email() compose_box = ComposeBox(context) maillist_actions = MailListActions(context) maillist_actions.open_compose_box() compose_box.enter_subject('email to myself %s' % random_subject()) compose_box.enter_body('Hi, \n this is an email. To find this email, I add this strange string here:\n eisheeneejaih7eiw7heiLah') compose_box.enter_recipient(email_to) compose_box.send_mail()
def step_impl(context): email_to = behave_email() compose_box = ComposeBox(context) maillist_actions = MailListActions(context) maillist_actions.open_compose_box() compose_box.enter_subject('email to myself %s' % random_subject()) compose_box.enter_body( 'Hi, \n this is an email. To find this email, I add this strange string here:\n eisheeneejaih7eiw7heiLah' ) compose_box.enter_recipient(email_to) compose_box.send_mail()