devise 確認メールのあれこれ

確認メールのurlアドレスをhttpsに変更

app/views/devise/mailer/confirmation_instructions.html.erb

confirmation_url(@resource, :confirmation_token => @token, protocol: "https")

確認メールの開発用と公開用の設定

ここでsmtpとかドメイン設定とかを忘れずに
config/environments/development.rb
config/environments/producation.rb

  # General Settings
  config.app_domain = 'www.hogehoge.com'

  # Email
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.perform_deliveries = true
  config.action_mailer.default_url_options = { host: config.app_domain }
  config.action_mailer.smtp_settings = {
    address: 'smtp.hogehoge.com',
    port: '587',
    enable_starttls_auto: true,
    user_name: 'hogehoge',
    password: ENV['MAIL_KEY'],
    authentication: :plain,
    domain: 'hogehoge'
  }

パスワードは環境変数

$export MAIL_KEY=foofoo