Emails Not Sending

133 views
Skip to first unread message

Edward Maya

unread,
Apr 14, 2015, 7:16:51 AM4/14/15
to rubyonra...@googlegroups.com
Hello Guys,

i have cloned this app
https://github.com/RailsApps/rails-devise-roles/

everything is fine but when i hit sign_up and fill out the form then it
should be sending an email but somehow it is not doing what it's
supposed to do.
my development.rb after replacing existing settings for email

config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com',
port: 587,
domain: 'gmail.com',
user_name: 'my_email',
password: 'my_password',
authentication: 'plain',
enable_starttls_auto: true }

--
Posted via http://www.ruby-forum.com/.

Colin Law

unread,
Apr 14, 2015, 11:22:42 AM4/14/15
to rubyonra...@googlegroups.com
What is in development.log when you try to do it?

I have not done gmail from rails, presumably you googled to find the
appropriate configuration.

Colin

Colin

>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5dbc605e189d36d673a921d8afbdbce9%40ruby-forum.com.
> For more options, visit https://groups.google.com/d/optout.

Edward Maya

unread,
Apr 14, 2015, 1:10:13 PM4/14/15
to rubyonra...@googlegroups.com
Colin Law wrote in post #1172030:
> What is in development.log when you try to do it?
>
> I have not done gmail from rails, presumably you googled to find the
> appropriate configuration.
>
> Colin
>
> Colin

Oh My Dear Lord Please Forgive Me _/\_ Any One OutThere Please Help Me.

Hassan Schroeder

unread,
Apr 14, 2015, 2:27:24 PM4/14/15
to rubyonrails-talk
On Tue, Apr 14, 2015 at 10:09 AM, Edward Maya <li...@ruby-forum.com> wrote:

>> What is in development.log when you try to do it?

> Oh My Dear Lord Please Forgive Me _/\_ Any One OutThere Please Help Me.

Ask for help -- ignore and disparage help given.

Not sure that's a winning strategy, but good luck with it.

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Consulting Availability : Silicon Valley or remote

Edward Maya

unread,
Apr 14, 2015, 3:49:19 PM4/14/15
to rubyonra...@googlegroups.com
Hassan Schroeder wrote in post #1172042:
> Ask for help -- ignore and disparage help given.
>
> Not sure that's a winning strategy, but good luck with it.
>
> --
> Hassan Schroeder ------------------------ hassan.s...@gmail.com
> http://about.me/hassanschroeder
> twitter: @hassan
> Consulting Availability : Silicon Valley or remote

I Have ask many questions here and he always confuses me a lot with
asking stuff no one ask for anywhere and eventually i left with 2 step
backwards from when i ask.

Norm Scherer

unread,
Apr 14, 2015, 4:55:45 PM4/14/15
to rubyonra...@googlegroups.com
What Colin asks for is reasonable and predictable. He wants to see what
the exact error messages are and he wants to see the code that generated
the message. As well he wants to verify that you have at least
completed a tutorial so you know what you are doing.

I agree with him.

Norm

Hassan Schroeder

unread,
Apr 14, 2015, 5:07:51 PM4/14/15
to rubyonrails-talk
On Tue, Apr 14, 2015 at 12:48 PM, Edward Maya <li...@ruby-forum.com> wrote:

> I Have ask many questions here and he always confuses me a lot with
> asking stuff no one ask for anywhere and eventually i left with 2 step
> backwards from when i ask.

If you truly believe that the question

"What is in development.log when you try to do it?"

is taking you "2 step backwards", or is not a question that *any*
experienced developer would ask -- mm,kay.

So walk me through your mental process. Other than looking at the
log files, how would you reason about the failure of your program?
Where would you look for clues?

Robby O'Connor

unread,
Apr 14, 2015, 5:33:59 PM4/14/15
to rubyonra...@googlegroups.com

Asking for help on irc, stackoverflow, or anywhere is NOT a replacement for basic research on your own. Asking that you have basic competence...so yeh. This is a major pet peeve of mine.

--Rob
Sent from my cell, please excuse any typos.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.

Scott Ribe

unread,
Apr 14, 2015, 6:35:45 PM4/14/15
to rubyonra...@googlegroups.com, Edward Maya
On Apr 14, 2015, at 11:09 AM, Edward Maya <li...@ruby-forum.com> wrote:
>
> Oh My Dear Lord Please Forgive Me _/\_ Any One OutThere Please Help Me.

****NO ONE**** is going to help you if you don't look in your damned development log and tell us what is logged by your attempt to send email. Without that, all we can do is make wild guesses, whereas with that there's a decent chance someone will be able to tell you exactly what the problem is.

--
Scott Ribe
scott...@elevated-dev.com
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice





Robby O'Connor

unread,
Apr 14, 2015, 6:38:48 PM4/14/15
to rubyonra...@googlegroups.com, Edward Maya

In addition the "woe is me" shit is not flattering.

--Rob
Sent from my cell, please excuse any typos.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.

Edward Maya

unread,
Apr 15, 2015, 1:01:50 AM4/15/15
to rubyonra...@googlegroups.com
wooh Calm down guys there's no need to bite a chunk out of my ass,
that's totally my choice whom to no or yes. any problem leave the thread
~(-_-)~ as there are plenty of rails forum out there where seriously
wants to help if someone facing any problem other then flamming and
lecturing the shit out of him with dialogues #Peace/.Out

Robby O'Connor

unread,
Apr 15, 2015, 1:12:28 AM4/15/15
to rubyonra...@googlegroups.com, Edward Maya
With the amount of time you've spent whining and arguing and acting like
you're a victim...why not just share what's in your development.log
file...as you were asked really early in this thread. You are not
entitled to help, in fact we can just say f off, some might...I
won't...so just do what we asked...because quite frankly -- all i've
heard is you whine which is why I'm pissed at you personally.

Edward Maya

unread,
Apr 15, 2015, 2:55:54 AM4/15/15
to rubyonra...@googlegroups.com
Robby O'Connor wrote in post #1172062:
> With the amount of time you've spent whining and arguing and acting like
> you're a victim...why not just share what's in your development.log
> file...as you were asked really early in this thread. You are not
> entitled to help, in fact we can just say f off, some might...I
> won't...so just do what we asked...because quite frankly -- all i've
> heard is you whine which is why I'm pissed at you personally.

Started GET "/" for 127.0.0.1 at 2015-04-15 12:14:01 +0530
[1m[36mActiveRecord::SchemaMigration Load (0.7ms)[0m [1mSELECT
"schema_migrations".* FROM "schema_migrations"[0m
Processing by VisitorsController#index as HTML
[1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "users"
Rendered visitors/index.html.erb within layouts/application (36.5ms)
Rendered layouts/_navigation_links.html.erb (51.2ms)
Rendered layouts/_navigation.html.erb (65.1ms)
Rendered layouts/_messages.html.erb (1.6ms)
Completed 200 OK in 3781ms (Views: 3640.1ms | ActiveRecord: 7.2ms)


Started GET "/users/sign_up" for 127.0.0.1 at 2015-04-15 12:14:08 +0530
Processing by Devise::RegistrationsController#new as HTML
Rendered devise/registrations/new.html.erb within layouts/application
(287.0ms)
Rendered layouts/_navigation_links.html.erb (1.6ms)
Rendered layouts/_navigation.html.erb (4.6ms)
Rendered layouts/_messages.html.erb (0.6ms)
Completed 200 OK in 1272ms (Views: 1016.6ms | ActiveRecord: 1.4ms)


Started POST "/users" for 127.0.0.1 at 2015-04-15 12:14:21 +0530
Processing by Devise::RegistrationsController#create as HTML
Parameters: {"utf8"=>"✓",
"authenticity_token"=>"/hlfWSuave2dv+n5BSXb/iXSAAfyG7swubt34y0ctADi3sFWXMmt8IwpZoYYn/i+vRpvXnEcFyJmdpCoacXWww==",
"user"=>{"name"=>"Chirag Arya", "email"=>"edward...@gmail.com",
"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"},
"commit"=>"Sign up"}
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
[1m[35mUser Exists (0.6ms)[0m SELECT 1 AS one FROM "users" WHERE
"users"."email" = 'edward...@gmail.com' LIMIT 1
[1m[36mUser Load (1.2ms)[0m [1mSELECT "users".* FROM "users" WHERE
"users"."confirmation_token" = ? ORDER BY "users"."id" ASC LIMIT 1[0m
[["confirmation_token",
"f41567c6ddb783f39206ae49bef6415315fdbdda0bc7ecc3b6cdbd8cebe82bc7"]]
[1m[35mSQL (2.2ms)[0m INSERT INTO "users" ("email",
"encrypted_password", "name", "role", "created_at", "updated_at",
"confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?,
?, ?) [["email", "edward...@gmail.com"], ["encrypted_password",
"$2a$10$R.hBU1Eo4koKO6i.HzVdPuxOzYcDGwo0iVZq2UNbs.bsqGLergAem"],
["name", "Chirag Arya"], ["role", 0], ["created_at", "2015-04-15
06:44:23.074144"], ["updated_at", "2015-04-15 06:44:23.074144"],
["confirmation_token",
"f41567c6ddb783f39206ae49bef6415315fdbdda0bc7ecc3b6cdbd8cebe82bc7"],
["confirmation_sent_at", "2015-04-15 06:44:25.369904"]]
Rendered
/home/malware/.rvm/gems/ruby-2.2.0@finalproject/gems/devise-3.4.1/app/views/devise/mailer/confirmation_instructions.html.erb
(3.2ms)

Devise::Mailer#confirmation_instructions: processed outbound mail in
1233.2ms

Sent mail to edward...@gmail.com (5526.5ms)
Date: Wed, 15 Apr 2015 12:14:26 +0530
From: no-r...@gmail.com
Reply-To: no-r...@gmail.com
To: edward...@gmail.com
Message-ID: <552e08cab9fc7_7...@Unbeatable-Lord.mail>
Subject: Confirmation instructions
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit

<p>Welcome edward...@gmail.com!</p>

<p>You can confirm your account email through the link below:</p>

<p><a
href="http://localhost:3000/users/confirmation?confirmation_token=mHp8SdA1M21y8qSgFiBM">Confirm
my account</a></p>

[1m[36m (0.7ms)[0m [1mrollback transaction[0m
Completed 500 Internal Server Error in 10379ms (ActiveRecord: 5.0ms)

Net::SMTPAuthenticationError - 530-5.5.1 Authentication Required. Learn
more at
:
/home/malware/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/smtp.rb:964:in
`check_response'
/home/malware/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/smtp.rb:933:in
`getok'
/home/malware/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/smtp.rb:841:in
`mailfrom'
/home/malware/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/smtp.rb:662:in
`send_message'
mail (2.6.3) lib/mail/network/delivery_methods/smtp.rb:113:in `block
in deliver!'
/home/malware/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/smtp.rb:521:in
`start'
mail (2.6.3) lib/mail/network/delivery_methods/smtp.rb:112:in
`deliver!'
mail (2.6.3) lib/mail/message.rb:2141:in `do_delivery'
mail (2.6.3) lib/mail/message.rb:236:in `block in deliver'
actionmailer (4.2.1) lib/action_mailer/base.rb:543:in `block in
deliver_mail'
activesupport (4.2.1) lib/active_support/notifications.rb:164:in
`block in instrument'
activesupport (4.2.1)
lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.1) lib/active_support/notifications.rb:164:in
`instrument'
actionmailer (4.2.1) lib/action_mailer/base.rb:541:in `deliver_mail'
mail (2.6.3) lib/mail/message.rb:236:in `deliver'
actionmailer (4.2.1) lib/action_mailer/message_delivery.rb:85:in
`deliver_now'
devise (3.4.1) lib/devise/models/authenticatable.rb:176:in
`send_devise_notification'
devise (3.4.1) lib/devise/models/confirmable.rb:102:in
`send_confirmation_instructions'
devise (3.4.1) lib/devise/models/confirmable.rb:158:in
`send_on_create_confirmation_instructions'
activesupport (4.2.1) lib/active_support/callbacks.rb:432:in `block in
make_lambda'
activesupport (4.2.1) lib/active_support/callbacks.rb:228:in `block in
halting_and_conditional'
activesupport (4.2.1) lib/active_support/callbacks.rb:506:in `block in
call'
activesupport (4.2.1) lib/active_support/callbacks.rb:506:in `call'
activesupport (4.2.1) lib/active_support/callbacks.rb:92:in
`_run_callbacks'
activesupport (4.2.1) lib/active_support/callbacks.rb:776:in
`_run_create_callbacks'
activerecord (4.2.1) lib/active_record/callbacks.rb:306:in
`_create_record'
activerecord (4.2.1) lib/active_record/timestamp.rb:57:in
`_create_record'
activerecord (4.2.1) lib/active_record/persistence.rb:502:in
`create_or_update'
activerecord (4.2.1) lib/active_record/callbacks.rb:302:in `block in
create_or_update'
activesupport (4.2.1) lib/active_support/callbacks.rb:88:in
`_run_callbacks'
activesupport (4.2.1) lib/active_support/callbacks.rb:776:in
`_run_save_callbacks'
activerecord (4.2.1) lib/active_record/callbacks.rb:302:in
`create_or_update'
activerecord (4.2.1) lib/active_record/persistence.rb:120:in `save'
activerecord (4.2.1) lib/active_record/validations.rb:37:in `save'
activerecord (4.2.1)
lib/active_record/attribute_methods/dirty.rb:21:in `save'
activerecord (4.2.1) lib/active_record/transactions.rb:286:in `block
(2 levels) in save'
activerecord (4.2.1) lib/active_record/transactions.rb:347:in `block
in with_transaction_returning_status'
activerecord (4.2.1)
lib/active_record/connection_adapters/abstract/database_statements.rb:213:in
`block in transaction'
activerecord (4.2.1)
lib/active_record/connection_adapters/abstract/transaction.rb:188:in
`within_new_transaction'
activerecord (4.2.1)
lib/active_record/connection_adapters/abstract/database_statements.rb:213:in
`transaction'
activerecord (4.2.1) lib/active_record/transactions.rb:220:in
`transaction'
activerecord (4.2.1) lib/active_record/transactions.rb:344:in
`with_transaction_returning_status'
activerecord (4.2.1) lib/active_record/transactions.rb:286:in `block
in save'
activerecord (4.2.1) lib/active_record/transactions.rb:301:in
`rollback_active_record_state!'
activerecord (4.2.1) lib/active_record/transactions.rb:285:in `save'
devise (3.4.1)
app/controllers/devise/registrations_controller.rb:19:in `create'
actionpack (4.2.1) lib/action_controller/metal/implicit_render.rb:4:in
`send_action'
actionpack (4.2.1) lib/abstract_controller/base.rb:198:in
`process_action'
actionpack (4.2.1) lib/action_controller/metal/rendering.rb:10:in
`process_action'
actionpack (4.2.1) lib/abstract_controller/callbacks.rb:20:in `block
in process_action'
activesupport (4.2.1) lib/active_support/callbacks.rb:117:in `call'
activesupport (4.2.1) lib/active_support/callbacks.rb:555:in `block (2
levels) in compile'
activesupport (4.2.1) lib/active_support/callbacks.rb:505:in `call'
activesupport (4.2.1) lib/active_support/callbacks.rb:92:in
`_run_callbacks'
activesupport (4.2.1) lib/active_support/callbacks.rb:776:in
`_run_process_action_callbacks'
activesupport (4.2.1) lib/active_support/callbacks.rb:81:in
`run_callbacks'
actionpack (4.2.1) lib/abstract_controller/callbacks.rb:19:in
`process_action'
actionpack (4.2.1) lib/action_controller/metal/rescue.rb:29:in
`process_action'
actionpack (4.2.1)
lib/action_controller/metal/instrumentation.rb:32:in `block in
process_action'
activesupport (4.2.1) lib/active_support/notifications.rb:164:in
`block in instrument'
activesupport (4.2.1)
lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.1) lib/active_support/notifications.rb:164:in
`instrument'
actionpack (4.2.1)
lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.2.1)
lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
activerecord (4.2.1)
lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.2.1) lib/abstract_controller/base.rb:137:in `process'
actionview (4.2.1) lib/action_view/rendering.rb:30:in `process'
actionpack (4.2.1) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.2.1)
lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.2.1) lib/action_controller/metal.rb:237:in `block in
action'
actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:74:in
`dispatch'
actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:43:in
`serve'
actionpack (4.2.1) lib/action_dispatch/routing/mapper.rb:49:in `serve'
actionpack (4.2.1) lib/action_dispatch/journey/router.rb:43:in `block
in serve'
actionpack (4.2.1) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:819:in
`call'
warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
warden (1.2.3) lib/warden/manager.rb:34:in `call'
rack (1.6.0) lib/rack/etag.rb:24:in `call'
rack (1.6.0) lib/rack/conditionalget.rb:38:in `call'
rack (1.6.0) lib/rack/head.rb:13:in `call'
actionpack (4.2.1)
lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/flash.rb:260:in
`call'
rack (1.6.0) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.6.0) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/cookies.rb:560:in
`call'
activerecord (4.2.1) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.2.1)
lib/active_record/connection_adapters/abstract/connection_pool.rb:649:in
`call'
activerecord (4.2.1) lib/active_record/migration.rb:378:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/callbacks.rb:29:in
`block in call'
activesupport (4.2.1) lib/active_support/callbacks.rb:88:in
`_run_callbacks'
activesupport (4.2.1) lib/active_support/callbacks.rb:776:in
`_run_call_callbacks'
activesupport (4.2.1) lib/active_support/callbacks.rb:81:in
`run_callbacks'
actionpack (4.2.1) lib/action_dispatch/middleware/callbacks.rb:27:in
`call'
actionpack (4.2.1) lib/action_dispatch/middleware/reloader.rb:73:in
`call'
actionpack (4.2.1) lib/action_dispatch/middleware/remote_ip.rb:78:in
`call'
better_errors (2.1.1) lib/better_errors/middleware.rb:84:in
`protected_app_call'
better_errors (2.1.1) lib/better_errors/middleware.rb:79:in
`better_errors_call'
better_errors (2.1.1) lib/better_errors/middleware.rb:57:in `call'
actionpack (4.2.1)
lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
web-console (2.1.2) lib/web_console/middleware.rb:37:in `call'
actionpack (4.2.1)
lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.1) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.1) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.1) lib/active_support/tagged_logging.rb:68:in
`block in tagged'
activesupport (4.2.1) lib/active_support/tagged_logging.rb:26:in
`tagged'
activesupport (4.2.1) lib/active_support/tagged_logging.rb:68:in
`tagged'
railties (4.2.1) lib/rails/rack/logger.rb:20:in `call'
quiet_assets (1.1.0) lib/quiet_assets.rb:27:in
`call_with_quiet_assets'
actionpack (4.2.1) lib/action_dispatch/middleware/request_id.rb:21:in
`call'
rack (1.6.0) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.0) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.1)
lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.0) lib/rack/lock.rb:17:in `call'
actionpack (4.2.1) lib/action_dispatch/middleware/static.rb:113:in
`call'
rack (1.6.0) lib/rack/sendfile.rb:113:in `call'
railties (4.2.1) lib/rails/engine.rb:518:in `call'
railties (4.2.1) lib/rails/application.rb:164:in `call'
rack (1.6.0) lib/rack/lock.rb:17:in `call'
rack (1.6.0) lib/rack/content_length.rb:15:in `call'
rack (1.6.0) lib/rack/handler/webrick.rb:89:in `service'
/home/malware/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:138:in
`service'
/home/malware/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:94:in
`run'
/home/malware/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/server.rb:294:in
`block in start_thread'



Started POST "/__better_errors/c2aa3bfba6857017/variables" for 127.0.0.1
at 2015-04-15 12:14:32 +0530


My Development Log

The Error I'm Getting
Net::SMTPAuthenticationError at /users

530-5.5.1 Authentication Required.

/home/malware/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/smtp.rb

end

end

def check_response(res)

unless res.success?

raise res.exception_class, res.message

end

end

def check_continue(res)

unless res.continue?


Using The Same Application i just changed secrets.yml file

development:
admin_name: Name Of Admin(which i will create in sign up i guess)
admin_email: Email Of Admin
admin_password: 12345678
email_provider_username: <%= ENV["GMAIL_USERNAME"] %>
email_provider_password: <%= ENV["GMAIL_PASSWORD"] %>
domain_name: example.com
secret_key_base:
9a420e1037f4f16eb5211a9594b181ac5a62cdb38da0e83cdfd2a2f8983c4daa03f35c696eecdbd0a448d1a99fff461d25c8f00d47ebe0fa7b4df895b2ccfaa3

test:
domain_name: example.com
secret_key_base:
bf3f1cea7ec7732797917f14a65b33c287189cb968366f79dcb4bb5e8fed532bb4de3b404a35c452dab11813a6f422242453122fdc44bdbf589e81ca3e03c373

# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
admin_name: <%= ENV["ADMIN_NAME"] %>
admin_email: <%= ENV["ADMIN_EMAIL"] %>
admin_password: <%= ENV["ADMIN_PASSWORD"] %>
email_provider_username: <%= ENV["GMAIL_USERNAME"] %>
email_provider_password: <%= ENV["GMAIL_PASSWORD"] %>
domain_name: <%= ENV["DOMAIN_NAME"] %>
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>

It's Not letting me send email after sign-up as well as not letting me
signup as an admin plus after i sign-up using the name and email and
password defined in development i get errors.

Robby O'Connor

unread,
Apr 15, 2015, 3:23:12 AM4/15/15
to rubyonra...@googlegroups.com, Edward Maya
The answer to what happened is right there in your logs, read it.
> Parameters: {"utf8"=>"✓",
> *Net::SMTPAuthenticationError - 530-5.5.1 Authentication Required. Learn
> more at*
> :
This is your problem.

Robby O'Connor

unread,
Apr 15, 2015, 3:24:11 AM4/15/15
to rubyonra...@googlegroups.com, Edward Maya
Also to add: if you encounter issues like this ALWAYS ALWAYS ALWAYS
check logs whether it be testing, production or development...it will
tell you what's wrong.
>> Parameters: {"utf8"=>"✓",

Edward Maya

unread,
Apr 15, 2015, 3:31:41 AM4/15/15
to rubyonra...@googlegroups.com
Robby O'Connor wrote in post #1172066:
> Also to add: if you encounter issues like this ALWAYS ALWAYS ALWAYS
> check logs whether it be testing, production or development...it will
> tell you what's wrong.

I still don't get you. where m i wrong ?
if you could answer me keeping in mind as i'm a novice user :/

Norbert Melzer

unread,
Apr 15, 2015, 4:02:36 AM4/15/15
to Rails Mailinglist

There was an authentication error against the google servers. That's it.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.

Edward Maya

unread,
Apr 15, 2015, 4:12:38 AM4/15/15
to rubyonra...@googlegroups.com
Norbert Melzer wrote in post #1172069:
> There was an authentication error against the google servers. That's it.
> Am 15.04.2015 09:31 schrieb "Edward Maya" <li...@ruby-forum.com>:

And how m i supposed to resolve this ? any further guidence

Norbert Melzer

unread,
Apr 15, 2015, 4:17:47 AM4/15/15
to Rails Mailinglist

Proofread username and password, double check server settings, google a tutorial about how to use activemailer with gmail.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.

Edward Maya

unread,
Apr 15, 2015, 5:16:32 AM4/15/15
to rubyonra...@googlegroups.com
Norbert Melzer wrote in post #1172071:
> Proofread username and password, double check server settings, google a
> tutorial about how to use activemailer with gmail.
> Am 15.04.2015 10:12 schrieb "Edward Maya" <li...@ruby-forum.com>:

i am doing google searching from yesterday and then i asked here :v
have a look at it
yesterday when it was working, when i sign up a new user and try to
access users after sign up then it gives error :access denied, so any
way to make a user admin ?

another one is today when i hit signup it is giving me error i described
before and the normal gmail smtp settings aren't working as you can see
in the development.rb and production.rb and in secrets.yml file

Colin Law

unread,
Apr 15, 2015, 5:40:45 PM4/15/15
to rubyonra...@googlegroups.com
Some advice, concentrate on one problem at a time when asking for
help. By asking another two questions in the same thread you have
just complicated the situation and no-one will know which problem to
respond to. So here concentrate on sorting your google authentication
problem. To ask the other questions start new threads with
appropriate subject lines. Also it is no good asking people to go
and look at an app you have cloned, no-one has the time for that. You
must ask targeted questions about specific issues you are having and
show us the specific bit of code that you are having trouble with.

Colin

Ron C.

unread,
Apr 15, 2015, 8:23:59 PM4/15/15
to rubyonra...@googlegroups.com
As a RoR novice myself, I can tell you that you are NOT doing your home
work before asking questions ... you are NOT putting in the necessary
time, patience and resolve required to find a solution for YOURSELF ...

However, in about 15 secs I found on the internet a possible hint to
what your problem is

http://stackoverflow.com/questions/4929680/setting-up-a-gmail-account-to-work-with-actionmailer-in-rails-3

Cheers

Cody Skidmore

unread,
Apr 15, 2015, 9:44:49 PM4/15/15
to rubyonra...@googlegroups.com
I use devise with Google apps hosted email which requires ssl. I'll post the configuration tomorrow.

Sai Ch

unread,
Apr 16, 2015, 8:19:37 AM4/16/15
to rubyonra...@googlegroups.com
put this code in

config/environments/development.rb

config.action_mailer.raise_delivery_errors = true
config.action_mailer.default_url_options = { :host => 'localhost:3000'
}
config.action_mailer.delivery_method = :smtp

ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "mail.gmail.com",
:user_name => “your...@gmail.com",
:password => “gmail-password",
:authentication => "plain",
:enable_starttls_auto => true

Cody Skidmore

unread,
Apr 16, 2015, 8:59:46 AM4/16/15
to rubyonra...@googlegroups.com
The following snippets are a working example of setting up ActionMailer/Devise using a domain email account hosted on Google Apps with Rails 4.2/Ruby 2.2.1. This is different than using regular Gmail account which only requires you to go into the account settings and turn on "Access for less secure apps". This setting isn't available for the former. You must use SSL instead.

From development.rb:
  # Devise configuration settings
  config.action_mailer.default_url_options = { :host => 'localhost:3000'}
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.perform_deliveries = true

From setup_mail.rb:
ActionMailer::Base.smtp_settings = {   :address        => 'smtp.gmail.com',   :port           => '465',   :authentication => 'plain',   :user_name      => 'exa...@example.com',   :password       => 'yourpassword',   :domain         => 'yourd...@example.com',   :ssl            => true }

This is a great video tutorial on setting up devise:

Respectfully,

Cody Skidmore

Robby O'Connor

unread,
Apr 18, 2015, 9:31:34 AM4/18/15
to rubyonra...@googlegroups.com, Sai Ch
I would also advise using mailcatcher in development...you don't need
gmail in development -- only maybe when you deploy to test production
settings...

On 04/16/2015 08:19 AM, Sai Ch wrote:
> put this code in
>
> config/environments/development.rb
>
> config.action_mailer.raise_delivery_errors = true
> config.action_mailer.default_url_options = { :host => 'localhost:3000'
> }
> config.action_mailer.delivery_method = :smtp
>
> ActionMailer::Base.smtp_settings = {
> :address => "smtp.gmail.com",
> :port => 587,
> :domain => "mail.gmail.com",
> :user_name => “your...@gmail.com",
> :password => “gmail-password",

Cody Skidmore

unread,
Apr 18, 2015, 9:54:47 AM4/18/15
to rubyonra...@googlegroups.com, li...@ruby-forum.com
Nice tip. Thanks.
Reply all
Reply to author
Forward
0 new messages