Gmail SMTP not working

370 views
Skip to first unread message

Dharam Singh

unread,
Jun 12, 2014, 5:45:13 AM6/12/14
to canvas-l...@googlegroups.com

I am not able to add Gmail smtp server for outgoing emails.
Please find the configuration and logs below

  address: "smtp.gmail.com"
  enable_starttls_auto: true
  port: "587"
  domain: "my domain"
  authentication: "plain"
  user_name: "XX...@gmail.com"
  password: "XXXXXXXXX"
  outgoing_address: "XX...@gmail.com"

Logs:
/var/canvas/script/delayed_job:5:in `<main>''', NULL, 'Delayed Notification processing failed', NULL, NULL, '2014-06-12 08:06:40.909663', '2014-06-12 08:06:40.909663', 'unknown-54...@instructure.example.com', 'f', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '---
exception_message: undefined method `account'' for nil:NilClass
', 'default') RETURNING "id" [0m
[ip-172-31-9-253:5796 454]   [4;35;1mSQL (28.2ms) [0m   [0mCOMMIT [0m
[ip-172-31-9-253:5796 454] Created ErrorReport ID 17
[ip-172-31-9-253:5796 454] delayed notification processing failed: undefined method `account' for nil:NilClass
(erubis:2:in `parse!'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/erubis-2.7.0/lib/erubis/evaluator.rb:65:in `eval'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/erubis-2.7.0/lib/erubis/evaluator.rb:65:in `result'
/var/canvas/app/models/message.rb:370:in `populate_body'
/var/canvas/app/models/message.rb:425:in `parse!'
/var/canvas/lib/notification_message_creator.rb:150:in `each'
/var/canvas/lib/notification_message_creator.rb:150:in `build_immediate_messages_for'
/var/canvas/lib/notification_message_creator.rb:78:in `block (3 levels) in create_message'
/var/canvas/lib/notification_message_creator.rb:71:in `each'
/var/canvas/lib/notification_message_creator.rb:71:in `block (2 levels) in create_message'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.8/lib/i18n.rb:256:in `with_locale'
/var/canvas/lib/notification_message_creator.rb:70:in `block in create_message'
/var/canvas/lib/notification_message_creator.rb:66:in `each'
/var/canvas/lib/notification_message_creator.rb:66:in `create_message'
/var/canvas/app/models/notification.rb:110:in `create_message'
/var/canvas/vendor/bundle/ruby/1.9.1/bundler/gems/rails-e86daf8ff727/activerecord/lib/active_record/associations/association_proxy.rb:215:in `method_missing'
/var/canvas/app/models/delayed_notification.rb:52:in `process'


Note : Where is it getting 'unknown-54...@instructure.example.com' from in the first line of the logs?
 
Thanks,
Dharam

kimo...@gmail.com

unread,
Aug 9, 2014, 11:13:00 AM8/9/14
to canvas-l...@googlegroups.com
Hi Dharam,
I have the same problem, and I am search for solution for more than 2 weeks, If I found one I will tell you and also you find tell me

---
Thanks & Regards
Karim Abd El-AAL

Note : Where is it getting 'unknown-54-255-136-93@instructure.example.com' from in the first line of the logs?
 
Thanks,
Dharam

Charles Wood

unread,
Aug 13, 2014, 6:43:25 PM8/13/14
to canvas-l...@googlegroups.com
Settings like that have worked for me. Are you certain you're editing the correct file?


--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ross Gailer

unread,
Aug 13, 2014, 7:11:48 PM8/13/14
to canvas-l...@googlegroups.com
My outgoing_mail.yml for production looks like this:

 address: "smtp.gmail.com"
  port: "25"
  user_name: "can...@xxxx.edu.au"
  password: "XXX"
  authentication: "plain" # plain, login, or cram_md5
  domain: "xxxx.edu.au"
  outgoing_address: "can...@xxxx.edu.au"
  default_name: "xxxx Canvas"

I run Google Apps for Education and this configuration worksl.

Note : Where is it getting 'unknown-54-255-136-93@instructure.example.com' from in the first line of the logs?
 
Thanks,
Dharam

Presbyterian Ladies' College Armidale
Locked Bag 5
ARMIDALE NSW 2350
ABN:79 017 381 796
CRICOS provider code: 02295G
Tel:    +61 2 6770 1700 

In the interests of environmental sustainability, PLC is endeavouring to communicate electronically where possible.

The contents of this email are confidential. Any unauthorised use of the contents is expressly prohibited. If you have received this email in error, please advise by telephone (reverse charges) immediately and then delete/destroy the email and any printed copies. Thank you.

Ross Gailer

unread,
Aug 13, 2014, 7:19:56 PM8/13/14
to canvas-l...@googlegroups.com
Also, don't forget to restart Canvas and Apache after you make changes so that the delayed jobs will pick them up.


shal...@gmail.com

unread,
Feb 23, 2015, 7:28:41 PM2/23/15
to canvas-l...@googlegroups.com
I am also having a lot of trouble with email.

No matter what I do, email will not work (I don't even get a message in my Canvas inbox - I presume the send has to work before it shows up there).

My outgoing_mail.yml is:

development:
   address: "<server name>"
   port: "25"
   domain: "yyy"
   outgoing_address: "y...@yyy.net"
   default_name: "Greeneville City Schools Canvas"

# or to use sendmail --
#
# development:
#   delivery_method: "sendmail"

test:
  delivery_method: "test"

production:
  delivery_method: "smtp"
  address: "<server name>"
  port: "25"
  domain: "yyy.net"
  outgoing_address: "y...@yyy.net"
  default_name: "Greeneville City Schools Canvas"

When I use this to query the log:
psql canvas_queue_production -c "select last_error from delayed_jobs order by updated_at desc limit 1;"

All I get is (1 row) - it doesn't actually show me an error.

I get the following when I run this command:

psql canvas_production -c "select message, backtrace from error_reports order by id desc limit 1;"


Message delivery failed | /usr/lib/ruby/1.9.1/openssl/ssl-internal.rb:170:in `post_connection_check'                                                        +
                         | /usr/lib/ruby/1.9.1/net/smtp.rb:586:in `tlsconnect'                                                                               +
                         | /usr/lib/ruby/1.9.1/net/smtp.rb:561:in `do_start'                                                                                 +
                         | /usr/lib/ruby/1.9.1/net/smtp.rb:520:in `start'                                                                                    +
                         | /var/canvas/vendor/bundle/ruby/1.9.1/gems/mail-2.5.4/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'                  +
                         | /var/canvas/vendor/bundle/ruby/1.9.1/gems/mail-2.5.4/lib/mail/message.rb:2129:in `do_delivery'                                    +
                         | /var/canvas/vendor/bundle/ruby/1.9.1/gems/mail-2.5.4/lib/mail/message.rb:232:in `block in deliver'                                +
                         | /var/canvas/vendor/bundle/ruby/1.9.1/gems/actionmailer-3.2.21/lib/action_mailer/base.rb:415:in `block in deliver_mail'            +
                         | /var/canvas/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/notifications.rb:123:in `block in instrument'   +
                         | /var/canvas/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/notifications/instrumenter.rb:20:in `instrument'+
                         | /var/canvas/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/notifications.rb:123:in `instrument'            +
                         | /var/canvas/vendor/bundle/ruby/1.9.1/gems/actionmailer-3.2.21/lib/action_mailer/base.rb:413:in `deliver_mail'                     +
                         | /var/canvas/vendor/bundle/ruby/1.9.1/gems/mail-2.5.4/lib/mail/message.rb:232:in `deliver'                                         +
                         | /var/canvas/app/models/message.rb:693:in `deliver_via_email'                                                                      +
                         | /var/canvas/app/models/message.rb:536:in `deliver'      

Although this changed to:

 Unable to get property 'id' of undefined or null reference | TypeError: Unable to get property 'id' of undefined or null reference                                                            +
                                                            |    at h.prototype._onArrowKey (https://canvas.gcschools.net/optimized/compiled/bundles/conversations_new.js?1424701559:5:10779)  +
                                                            |    at h.prototype._onDownKey (https://canvas.gcschools.net/optimized/compiled/bundles/conversations_new.js?1424701559:5:10589)   +
                                                            |    at h.prototype._onInputAction (https://canvas.gcschools.net/optimized/compiled/bundles/conversations_new.js?1424701559:5:5662)+
                                                            |    at t (https://canvas.gcschools.net/optimized/compiled/bundles/common.js?1424701567:4:1124)                                    +
                                                            |    at I.event.dispatch (https://canvas.gcschools.net/optimized/compiled/bundles/common.js?1424701567:2:4674)                     +
                                                            |    at s (https://canvas.gcschools.net/optimized/compiled/bundles/common.js?1424701567:2:603)
(1 row)

after the last edit of outgoing_mail.yml.  I am bouncing Apache and Canvas after each change.

Any help you can give me will be greatly appreciated.

Vishnu Lal

unread,
Aug 21, 2016, 2:25:06 PM8/21/16
to Canvas LMS Users
Hello,

Anyone got any fix for the issue?

Note : Where is it getting 'unknown-54-255-136-93@instructure.example.com' from in the first line of the logs?
 
Thanks,
Dharam
Reply all
Reply to author
Forward
0 new messages