canvas-lms icon indicating copy to clipboard operation
canvas-lms copied to clipboard

Canvas not sending emails

Open ghost opened this issue 4 years ago • 10 comments

Summary:

Canvas is not sending emails. When creating a new user, they don't receive an email : 'Email the user about this account creation' is checked.

Steps to reproduce:

  1. got to peoples section in Admin panel
  2. add a new user and provide his email
  3. no email is sent to that user

Expected behavior:

An email should be sent to the user.

Actual behavior:

No email is sent to users.

Additional notes:

My outgoing_mail.yml file:

production: address: "smtp.google.com" port: "465" user_name: "[email protected]" password: "pass" authentication: "plain" # plain, login, or cram_md5 domain: "smtp.gmail.com" tls: "false" enable_starttls_auto: "false" outgoing_address: "[email protected]" default_name: "Instructure Canvas"

I also tried without:

tls: "false" enable_starttls_auto: "false"

  • Less secure app is enabled in my google account

What's weird is that I don't see any SMTP or MAIL related log messages: I tried these files

  • delayed_job.log
  • production.log
  • apache2's logs: errors.log
  • passenger log

What I tried also is 'tail -f LOG_FILE' while adding users to see whether an error message is logged: no message about email/smtp.

I v=have seen a solution that suggests to have a config like mine for outgoing_mails, and then launch '/var/canvas/script/canvas_init', but this command seems to take infinite time by often printing '/bin/bash: warning: shell level (1000) too high, resetting to 1'.

  • Redis server is running.

Any suggestion would be appreciated!

ghost avatar Dec 20 '20 10:12 ghost

did you figured this out?

designamx avatar Apr 21 '21 03:04 designamx

did you figured this out?

I just reinstalled canvas. Maybe I missed something in the first installation.

ghost avatar Apr 21 '21 10:04 ghost

thanks, for future referencies, to debug I did this

psql canvas -c "select created_at, message, backtrace from error_reports order by id desc;" Doing that I got the error for the SMTP connection

designamx avatar Apr 21 '21 17:04 designamx

Hi, I launched a site using bitnami LMS Canvas and I tried to set up an SMTP for my site. I tried several SMTP hosts like mailchimp(madrill SMTP), gmail SMTP and AWS SES. The test mail is working perfectly(SMTP Online tester) but in CANVAS it is not working. I edited my outgoing_mail.yml file and checked. The mail is not sending in any of the SMTP Server I have mentioned above and also the madrill SMTP worked for a while but it is also not working now.

outgoing_mail.yml: While using gmail SMTP:

production: address: "smtp.gmail.com" tls : true port: "587" user_name: "XXXXXX" password: "XXXXXXXXXXXXX" authentication: "login" # plain, login, or cram_md5 domain: "XXXXXXXXXXX.in" outgoing_address: "XXXXXXXX" default_name: "XXXXXXXX"

While using madrill SMTP: production: address: "smtp.mandrillapp.com" tls : true port: "587" user_name: "XXXXXX" password: "XXXXXXXXXXXXX" authentication: "login" # plain, login, or cram_md5 domain: "XXXXXXXXXXX.in" outgoing_address: "XXXXXXXX" default_name: "XXXXXXXX"

While using AWS(SES) SMTP: production: address: "XXXXXXXXXXXXXXX(The host I got from AWS SES)" tls : true port: "587" user_name: "XXXXXX" password: "XXXXXXXXXXXXX" authentication: "login" # plain, login, or cram_md5 domain: "XXXXXXXXXXX.in" outgoing_address: "XXXXXXXX" default_name: "XXXXXXXX"

       I don't know what I am missing and also madrill SMTP is worked for a while but I don't know why it is not working now. Could anybody please reply and correct me if I am done anything wrong. 

Thanks.

impnandhu avatar Feb 22 '22 06:02 impnandhu

Hi. Did anyone resolve this issue?

muimid avatar Oct 18 '22 08:10 muimid

I have the same issue. Did anyone resolve the issue?

johntheocs avatar Nov 04 '22 23:11 johntheocs

Best resources for support for OSS Canvas is the Mailing List or IRC Channel.

http://instructure.github.io/

johntheocs avatar Nov 05 '22 00:11 johntheocs

I am leaving this here for anyone who comes across this issue in the future. The problem was due to a very simple mistake on my part. In my case, I had not executed the following commands. I hope this helps someone:

sudo ln -s /var/canvas/script/canvas_init /etc/init.d/canvas_init sudo update-rc.d canvas_init defaults sudo /etc/init.d/canvas_init start`

osho210 avatar Oct 08 '23 10:10 osho210

Run

/var/canvas/script/canvas_init start

umarsabra avatar Dec 21 '23 23:12 umarsabra

I am on the latest canvas build, and this issue has stumped me. The SMTP server route from Canvas node to my SMTP server is ok and healthy. I had already used canvas_init start earlier. No error logs, nothing. Not even any logs in the database one user suggested in this thread using psql canvas -c "select created_at, message, backtrace from error_reports order by id desc;"

ceekr avatar Jan 20 '24 00:01 ceekr