how to get setting confirm email from production ?

58 views
Skip to first unread message

eben sinaga

unread,
Jul 20, 2017, 3:21:08 AM7/20/17
to Ruby on Rails: Talk
Hi there,

I have been using this tutorial https://www.youtube.com/watch?v=EycP9L_x5rE to create confirming email. For production it doesn't work. Can you help me ?

Thx

Colin Law

unread,
Jul 20, 2017, 3:44:42 AM7/20/17
to Ruby on Rails: Talk
You need to give us more information. First tell us what doesn't
work, for example does it crash, show an error, everything seems ok
but the email is not sent, etc. Look in the log (log/production.log)
and see what is there when it should send the email. Post the relevant
section of the log here if you are still stuck. Please copy/paste
from the terminal rather than sending images. If it refers to
particular lines in your code then post that section of the code here
also.

Colin

eben sinaga

unread,
Jul 20, 2017, 3:52:34 AM7/20/17
to Ruby on Rails: Talk
you're right,  my error is "everything seems ok but also my email is not sent"

thx

Colin Law

unread,
Jul 20, 2017, 4:02:03 AM7/20/17
to Ruby on Rails: Talk
On 20 July 2017 at 08:52, eben sinaga <ebenpe...@gmail.com> wrote:
> you're right, my error is "everything seems ok but also my email is not
> sent"

The other thing that is important when asking for help is to make sure
you supply all the information that is asked for. Please read my
previous reply again.

Colin
> --
> 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/cd3c984e-390e-4951-8959-2a8d5d0d2046%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

eben sinaga

unread,
Jul 20, 2017, 4:10:11 AM7/20/17
to Ruby on Rails: Talk
this code from my terminal

Sent mail to y...@handbo.id (150.1ms)
2017-07-20T07:32:07.430225+00:00 app[web.1]: Date: Thu, 20 Jul 2017 07:32:07 +0000
2017-07-20T07:32:07.430226+00:00 app[web.1]: From: x...@handbo.id
2017-07-20T07:32:07.430227+00:00 app[web.1]: To: y...@handbo.id
2017-07-20T07:32:07.430228+00:00 app[web.1]: Message-ID: <59705c7745f62_43...@7b08f3b0-71d8-4acc-b87f-3513d3a7b512.mail>
2017-07-20T07:32:07.430228+00:00 app[web.1]: Subject: Selamat Datang di Handbo
2017-07-20T07:32:07.430229+00:00 app[web.1]: Mime-Version: 1.0
2017-07-20T07:32:07.430229+00:00 app[web.1]: Content-Type: text/html;
2017-07-20T07:32:07.430230+00:00 app[web.1]:  charset=UTF-8
2017-07-20T07:32:07.430230+00:00 app[web.1]: Content-Transfer-Encoding: 7bit
2017-07-20T07:32:07.430231+00:00 app[web.1]: 
2017-07-20T07:32:07.430232+00:00 app[web.1]:  Hi y...@handbo.id,
2017-07-20T07:32:07.430232+00:00 app[web.1]: 
2017-07-20T07:32:07.430233+00:00 app[web.1]: Terimakasih Telah Mendaftar di Handbo. Untuk aktivasi silahkan klik link dibawah ini:
2017-07-20T07:32:07.430234+00:00 app[web.1]: 
2017-07-20T07:32:07.430235+00:00 app[web.1]: http://handbo.id/users/SR2vCJx9FsTKqI_v1wwEaA/confirm_email
2017-07-20T07:32:07.431059+00:00 app[web.1]: Redirected to https://www.handbo.id/login

Colin Law

unread,
Jul 20, 2017, 4:26:20 AM7/20/17
to Ruby on Rails: Talk
What email server are you using? Is there anything useful in its log?

Is it only the confirmation email that is not working or can you not
send any email at all?

Colin
> https://groups.google.com/d/msgid/rubyonrails-talk/e510ca0e-8a4b-4336-9010-2cb7ab514eff%40googlegroups.com.

eben sinaga

unread,
Jul 20, 2017, 4:35:20 AM7/20/17
to Ruby on Rails: Talk
I am using heroku and I can't send email to other users.


On Thursday, 20 July 2017 15:26:20 UTC+7, Colin Law wrote:
On 20 July 2017 at 09:10, eben sinaga <ebenpe...@gmail.com> wrote:
> this code from my terminal
>
> Sent mail to y...@handbo.id (150.1ms)
> 2017-07-20T07:32:07.430225+00:00 app[web.1]: Date: Thu, 20 Jul 2017 07:32:07
> +0000
> 2017-07-20T07:32:07.430226+00:00 app[web.1]: From: x...@handbo.id
> 2017-07-20T07:32:07.430227+00:00 app[web.1]: To: y...@handbo.id
> 2017-07-20T07:32:07.430228+00:00 app[web.1]: Message-ID:
> <59705c7745f62_43f96ed1d8da012649@7b08f3b0-71d8-4acc-b87f-3513d3a7b512.mail>

eben sinaga

unread,
Jul 20, 2017, 4:46:59 AM7/20/17
to Ruby on Rails: Talk
This code from my config 

config.action_mailer.default_url_options = { :host => 'https://www.handbo.id' }
# ActionMailer Config
# Setup for production - deliveries, no errors raised
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = false
config.action_mailer.default :charset => "utf-8"

 config.action_mailer.smtp_settings = {
:address              => "smtp.gmail.com",
:port                 => 587,
:user_name            => ENV['gmail_username'],
:password             => ENV['gmail_password'],
:authentication       => "plain",
:enable_starttls_auto => true
}

is it true ?

Colin Law

unread,
Jul 20, 2017, 8:48:42 AM7/20/17
to Ruby on Rails: Talk
On 20 July 2017 at 09:46, eben sinaga <ebenpe...@gmail.com> wrote:
> This code from my config
>
> config.action_mailer.default_url_options = { :host =>
> 'https://www.handbo.id' }
> # ActionMailer Config
> # Setup for production - deliveries, no errors raised
> config.action_mailer.delivery_method = :smtp
> config.action_mailer.perform_deliveries = true
> config.action_mailer.raise_delivery_errors = false
> config.action_mailer.default :charset => "utf-8"
>
> config.action_mailer.smtp_settings = {
> :address => "smtp.gmail.com",
> :port => 587,
> :user_name => ENV['gmail_username'],
> :password => ENV['gmail_password'],
> :authentication => "plain",
> :enable_starttls_auto => true
> }

I don't know about sending email via gmail from Heroku but google
found this which might be relevant
https://blog.heroku.com/tech_sending_email_with_gmail

Colin

eben sinaga

unread,
Jul 20, 2017, 10:24:01 PM7/20/17
to rubyonra...@googlegroups.com
Thank you Collin. You are awesome . I have finished about it.

--
You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/tW2hGD9b7QY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtSAi4XxLZw40%3DPjdutHN91UBF%2BQeDFmTxTqHJ1LChJ8g%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages