Comments (1)
It maybe a bit late to help with this particular problem, but it might help someone else in the future ...
I was stuck with the same issue recently where I tried to set up Email Notifier without authentication because we run our own email server locally and sending an email from a client will fail if we try to use any type of authentication.
In the end the solution which worked for us was;
- SSH into OctoPi and open the file
__init__.py
which was located under
/home/pi/oprint/lib/python2.7/site-packages/octoprint_emailnotifier
- At the end of the file, comment out the line;
mailer = yagmail.SMTP(user={self._settings.get(['mail_username']):self._settings.get(['mail_useralias'])}, host=self._settings.get(['mail_server']),port=self._settings.get(['mail_server_port']), smtp_starttls=self._settings.get(['mail_server_tls']), smtp_ssl=self._settings.get(['mail_server_ssl']))
- Add a new line directly under with the following;
mailer = yagmail.SMTP(user=self._settings.get(['mail_username']), password=None, host=self._settings.get(['mail_server']), port=self._settings.get(['mail_server_port']), smtp_skip_login=True, smtp_starttls=self._settings.get(['mail_server_tls']), smtp_ssl=self._settings.get(['mail_server_ssl']))
- Save and reboot the Pi.
The key changes to the original line were;
Removed self._settings.get(['mail_useralias'])
(we didn't need the alias parameter)
Added password=None
(you still need a username for the "From" section of the email, but no P/W)
Added smtp_skip_login=True
(this was the big one!)
You can directly edit the existing line if you like, but I always like to keep the original code as a reference (particularly when testing) or just in case something goes wrong and you need to revert back.
Additionally, we also needed to add our desired username to a new file in the home directory which caused another error (because the yagmail was looking for this file, which was missing). The username is just used for the "From" section of the email sent, and in our case it didn't even need to be a valid user on our email system (update the "{ }" sections in the following to suit).
echo {Username}@{Email Address} > ~/.yagmail
I hope this helps!
OctoPrint Email Notifier Settings Example for No SMTP Authentication
from octoprint-emailnotifier.
Related Issues (20)
- Send snapshot for every x % complete
- Sending failed. Reason:: please run connect() first
- Feature Request: Flip the image of the photo
- Mail rejected due to invalid header HOT 1
- Can not send email to smtp.gmail.com from your own domain
- Cannot get to work with gmail HOT 5
- validate_email ERROR - On Test Email Send HOT 11
- How to configure TLS with port 587 HOT 2
- I fixed some issue, so... HOT 4
- Error message upon sending a "test" email: Sending failed. Reason:: Emailaddress "" is not valid according to RFC 2822 standards HOT 4
- SMTP _ssl Issue HOT 1
- Is this project dead? HOT 1
- delay sending email? HOT 1
- Global name "keyring" is not defined HOT 2
- Help me with my working postfix fork....
- Is this a dead project? HOT 1
- ERROR: Package 'keyring' requires a different Python: 2.7.13 not in '>=3.5' HOT 3
- Emails not being sent HOT 5
- STARTTLS Issues HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from octoprint-emailnotifier.