how to get setting confirm email from production ?

Hi there,

I have been using this tutorial Rails - Add Email Confirmation to Registration System - YouTube to create confirming email. For production it doesn’t work. Can you help me ?

Thx

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

you’re right, my error is “everything seems ok but also my email is not sent”

thx

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

this code from my terminal

Sent mail to yyy@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: xxx@handbo.id

2017-07-20T07:32:07.430227+00:00 app[web.1]: To: yyy@handbo.id

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 yyy@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

this code from my terminal

Sent mail to yyy@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: xxx@handbo.id 2017-07-20T07:32:07.430227+00:00 app[web.1]: To: yyy@handbo.id 2017-07-20T07:32:07.430228+00:00 app[web.1]: Message-ID: <59705c7745f62_43f96ed1d8da012649@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 yyy@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

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

I am using heroku and I can’t send email to other users.

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 ?

I don't know about sending email via gmail from Heroku but google found this which might be relevant

Colin

Thank you Collin. You are awesome . I have finished about it.