Skip to content

Commit

Permalink
Update pylint.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasM937 committed Dec 29, 2023
1 parent 7b3f70d commit d1b390b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
python -m pip install --upgrade pip
pip install pylint
pip install qiskit
pip install qiskit_ibm_provider
- name: Analysing the code with pylint
run: |
pylint --disable R,C,W,no-error,design $(git ls-files '*.py')
29 changes: 29 additions & 0 deletions src/mail_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import smtplib


def main():
smtp_obj = smtplib.SMTP('smtp.mail.me.com', 587)
smtp_obj.starttls()
smtp_obj.login('mailaddress', 'Passwort')

pairs = {'name_1': '[email protected]', 'name_2': '[email protected]'}

try:
for name in pairs.keys():
msg = ('From: {}\r\nTo: {}\r\n\r\nHi, {}'.format(smtp_obj.user,
pairs.get(name),
name))

print('Sending email to {} at {}...'.format(name, pairs.get(name)))

send_status = smtp_obj.sendmail(from_addr=smtp_obj.user,
to_addrs=pairs.get(name),
msg=msg)

if send_status != {}:
print('There was a problem sending mail to {}.\n{}'.format(name, send_status))
finally:
smtp_obj.quit()

if __name__ == '__main__':
main()

0 comments on commit d1b390b

Please sign in to comment.