Skip to content

Commit

Permalink
possible fix for issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyingDiver committed Nov 15, 2016
1 parent bdad3d2 commit fd97522
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion BetterEmail.indigoPlugin/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>PluginVersion</key>
<string>7.0.0</string>
<string>7.0.1</string>
<key>ServerApiVersion</key>
<string>2.0</string>
<key>IwsApiVersion</key>
Expand Down
6 changes: 3 additions & 3 deletions BetterEmail.indigoPlugin/Contents/Server Plugin/SMTPServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def smtpSend(self, pluginAction):
if smtpProps['encryptionType'] == 'SSL':
connection = smtplib.SMTP_SSL(smtpProps['address'].encode('ascii', 'ignore'), int(smtpProps['hostPort']))
connection.ehlo()
connection.login(smtpProps["serverLogin"], smtpProps["serverPassword"])
connection.login(smtpProps["serverLogin"].encode('ascii', 'ignore'), smtpProps["serverPassword"].encode('ascii', 'ignore'))
connection.sendmail(emailFrom, toAddresses, msg.as_string())
connection.quit()

Expand All @@ -109,15 +109,15 @@ def smtpSend(self, pluginAction):
connection.ehlo()
connection.starttls()
connection.ehlo()
connection.login(smtpProps["serverLogin"], smtpProps["serverPassword"])
connection.login(smtpProps["serverLogin"].encode('ascii', 'ignore'), smtpProps["serverPassword"].encode('ascii', 'ignore'))
connection.sendmail(emailFrom, toAddresses, msg.as_string())
connection.quit()

elif smtpProps['encryptionType'] == 'None':
connection = smtplib.SMTP(smtpProps['address'].encode('ascii', 'ignore'), int(smtpProps['hostPort']))
connection.ehlo()
if (len(smtpProps["serverLogin"]) > 0) and (len(smtpProps["serverPassword"]) > 0):
connection.login(smtpProps["serverLogin"], smtpProps["serverPassword"])
connection.login(smtpProps["serverLogin"].encode('ascii', 'ignore'), smtpProps["serverPassword"].encode('ascii', 'ignore'))
connection.sendmail(emailFrom, toAddresses, msg.as_string())
connection.quit()

Expand Down

0 comments on commit fd97522

Please sign in to comment.