Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 7 -Listing 63: Email without from-adress and subject #393

Open
Michael2302 opened this issue May 17, 2024 · 3 comments
Open

Chapter 7 -Listing 63: Email without from-adress and subject #393

Michael2302 opened this issue May 17, 2024 · 3 comments
Labels

Comments

@Michael2302
Copy link

With listing 63, there is no from-adress and no subject in the sended email. Maybe there is a change in SMTPHandler.
My provider works with SSL/TLS so I have to change your listing and work with smtplib.SMTP_SSL. In this case I also changed the formatting of the mail-handler and use email.message for the message. After that all works ok.
I've attached my listing, so you can have a look at my solution.
Sorry for my poor english.
Michael
Listing 63 init .txt

@miguelgrinberg
Copy link
Owner

I don't understand why the from address and subject are missing for you, since they are set in the code.

@Michael2302
Copy link
Author

If no one else had this problem I think the problem sits in front of my keyboard.
Maybe it happens while I tried to implement SSL/TLS.
However, I continue to read your outstanding book.
Thank you for your patience.

@CyCyCy777
Copy link

I'm having trouble running your code and was hoping you could help me out.

I entered the code in terminal 1:
aiosmtpd -n -c aiosmtpd.handlers.Debugging -l localhost:8025

In terminal 2 I entered the code:
set MAIL_SERVER=localhost
set MAIL_PORT=8025
flask run

and successfully triggered the SQLAlchemy error, but instead of receiving the error log email in Terminal 1, it prints a stack trace of all the errors in Terminal 1, what's going on here?

Anyway, I will continue to learn from this great tutorial of yours.
Thanks for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants