Skip to content

Commit

Permalink
Fix #3 by allowing multiple recipients. Also address #8 by adding a s…
Browse files Browse the repository at this point in the history
…tacktrace to failed send message.
  • Loading branch information
mikechabot committed Feb 27, 2021
1 parent 322fd3b commit 04e5759
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions spoofer/commands/wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def run(args):

recipients = [get_required('Recipient address: ')]
if get_yes_no('Enter additional recipients (Y/N)?: ', 'n'):
recipient = True;
while recipient:
recipient = get_optional('Recipient address: ', None)
if recipient:
Expand Down
2 changes: 2 additions & 0 deletions spoofer/models/smtpconnection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import smtplib
import traceback
from socket import gaierror
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
Expand Down Expand Up @@ -97,4 +98,5 @@ def send_mail(self, message):
logger.success('Message sent!')
except smtplib.SMTPException:
logger.error('Unable to send message. Check sender, recipients and message body')
logger.error(traceback.format_exc())
exit(1)

0 comments on commit 04e5759

Please sign in to comment.