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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved SMTP error logging in development #1390

Open
kodumbeats opened this issue Jul 13, 2021 · 10 comments
Open

Improved SMTP error logging in development #1390

kodumbeats opened this issue Jul 13, 2021 · 10 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@kodumbeats
Copy link
Contributor

馃殌 Feature

Improve error logging in the Mails worker by conditionally setting $mail->SMTPDebug = true;

Have you spent some time to check if this issue has been raised before?

Yes.

Have you read the Code of Conduct?

Yes.

Pitch

Appwrite uses phpmailer in the Mails worker to send SMTP messages. If the SMTP server rejects the email for whatever reason, it responds with an unhelpful error message:

SMTP Error: Data not accepted.

I propose we conditionally set $email->SMTPDebug = true; when _APP_ENV=development to give some control when troubleshooting SMTP.

@eldadfux
Copy link
Member

I think we can have this setting enabled by default using the doctor command

@loftwah
Copy link

loftwah commented Aug 4, 2021

Is this in the documentation? I'm poking around with Appwrite and this is the kind of thing I'd hopefully find there. Is this a setting that could be controlled from the UI?

@stnguyen90
Copy link
Contributor

We will no longer enable SMTP debug in the doctor command because it's a bit messy. See #5075 (comment)

@stnguyen90
Copy link
Contributor

We also don't want to enable SMTP debug in the worker logs because of how messy it is. If we move forward with this, we would add a separate docker compose exec appwrite debug smtp command that would send a test email with the SMTP debug enabled.

@stnguyen90 stnguyen90 added the good first issue Good for newcomers label Feb 14, 2023
@mustansirgodhrawala
Copy link

mustansirgodhrawala commented Aug 18, 2023

@stnguyen90 Could you please assign this issue to me, since I just understood how we implement the doctor smtp testing?

@stnguyen90
Copy link
Contributor

@mustansirgodhrawala, thanks for your interest! There are going to be some changes to tasks soon so best to hold off on this until after 1.4.0

@mustansirgodhrawala
Copy link

Sounds good

@stnguyen90
Copy link
Contributor

@mustansirgodhrawala are you still interested in working on this?

@stnguyen90 stnguyen90 self-assigned this Sep 22, 2023
@qayyum22
Copy link

qayyum22 commented Oct 4, 2023

hey @stnguyen90, is the logic to set $mail->SMTPDebug = true to be added to only workers->mails or other files also ?

@nick2432
Copy link

nick2432 commented Nov 6, 2023

can i work on this?

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

No branches or pull requests

7 participants