Configuration of outgoing email

96 views
Skip to first unread message

Peter Reavy

unread,
Jul 21, 2016, 12:21:43 PM7/21/16
to Canvas LMS Users
Hi everyone,

I have installed the current version of Canvas using the Production setup guide and all is working apart from outgoing email.

I am satisfied that a connection is possible because I am able to send email to my remote SMTP server from a Ruby script based on the one here:

I have been through the steps here

I can browse jobs using the /jobs page and the following are the only failed ones:

tag: periodic: Account.update_all_update_account_associations
tag: DataFixup::AddLtiMessageHandlerIdToLtiResourcePlacements.run
tag: DataFixup::MoveScribdDocsToRootAttachments.run

I don't see anything useful at the end of  /var/canvas/log/delayed_job.log (which is tough to dig into since it is > 1 GB in size). I don't see anything in the logs at /var/log/apache2.

The stanza from /var/canvas/config/outgoing_mail.yml is like this:

production:
  tls: true
  enable_starttls: true
  address: "smtp.blah.com"
  port: "587"
  user_name: "xxxx"
  password: "xxxx"
  authentication: "login" # plain, login, or cram_md5
  domain: "xxxxx.blah.blah.com"
  outgoing_address: "x...@blah.com"
  default_name: "Instructure Canvas QUB"

I have tried many variations on that.

If anyone can point me at other log locations I should be looking at or any other method I can use to troubleshoot this, I would be very grateful.

Peter

Peter Reavy

unread,
Jul 27, 2016, 7:43:56 AM7/27/16
to Canvas LMS Users
I have now verified that my Canvas email settings are correct by sending an email from the Rails console using my email settings.

    cd /var/canvas
    sudo su canvasuser -c "env GEM_HOME=/var/canvas/gems RAILS_ENV=production script/rails console"

Query that ActionMailer is set up right:

    ActionMailer::Base.delivery_method
    ActionMailer::Base.smtp_settings

Send an email from ActionMailer

    ActionMailer::Base.mail(from: "som...@somewhere.com", to: "som...@somewhereelse.com", subject: "Test", body: "Test").deliver


I think that whichever job sends email is not kicking off. The delayed jobs are running as far as I can tell:

    /etc/init.d/canvas_init status

returns

    Delayed jobs running, pool PID: 37909

Please, can anyone tell me how to investigate the jobs further?

Thank you.

Peter

Samuel Santhosh

unread,
Jul 28, 2016, 12:19:50 AM7/28/16
to Canvas LMS Users
Did you restarted your delayed job after changing config?

Peter Reavy

unread,
Jul 28, 2016, 7:18:57 AM7/28/16
to Canvas LMS Users
Hi Samuel,

thank you. Yes, I have been doing 'canvas_init restart' and I have also rebooted the machine now.

Peter

Peter Reavy

unread,
Jul 28, 2016, 11:49:57 AM7/28/16
to Canvas LMS Users
This was a non-problem.

I was testing the outgoing email by using a test account for which I had assigned an email address but no login. The outgoing email was working all along.
Reply all
Reply to author
Forward
0 new messages