Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 490891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:57:19+00:00 2026-05-13T01:57:19+00:00

I am using Action Mailer and have my configuration settings for Action Mailer in

  • 0

I am using Action Mailer and have my configuration settings for Action Mailer in my environment.rb file. I would like to post my project in a public repository along with an environment.rb file, but I do not want to include my mail server’s login information. How does one configure Capistrano’s deploy.rb so that it prompts the user for the mail server settings and then modifies or creates an environment.rb file during Capistrano’s deployment.

Thanks for looking =)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T01:57:20+00:00Added an answer on May 13, 2026 at 1:57 am

    There are lots of other variations on this… see this blog post for more ideas:
    http://www.simonecarletti.com/blog/2009/06/capistrano-and-database-yml

    Here a start…

    Add this into your production.rb environment file:

    ActionMailer::Base.smtp_settings = File.expand_path(File.join(RAILS_ROOT, 'config', 'actionmailer.yml'))
    

    And in a capistrano task, you can do something like this:

    desc "Generate actionmailer.yml file" 
    task :generate_actionmailer_yml, :roles=>:app do
      secret_password = Capistrano::CLI.ui.ask "Enter your secret mail password:"
    
      template = File.read("config/deploy/actionmailer.yml.erb")
      buffer = ERB.new(template).result(binding)
      put buffer, "#{shared_path}/config/actionmailer.yml"
    end
    
    desc "Link actionmailer.yml from shared" 
    task :link_actionmailer_yml, :roles=>:app do
      run "rm -f #{current_path}/config/actionmailer.yml && ln -s #{shared_path}/config/actionmailer.yml #{current_path}/config/actionmailer.yml"
    end
    
    after "deploy:finalize_update", "deploy:link_actionmailer_yml"
    

    Then, you create a template actionmailer.yml.erb file:

    address: "my.smtp.com"
    port: 587
    authentication: :plain
    user_name: "user@name.com"
    password: <%= secret_password %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Action Mailer setup to render an email using the body attribute of
I have the following configuration set in my factories.yml file... all: mailer: param: transport:
Just a quick one: what are peoples thoughts on using Action delegates for public
I'm using GMail as my SMTP server. I have that configuration working just fine:
I am using Ruby on Rails 3.1.0 and I would like to properly generate
I have a .rhtml file and there are many condition checks like this <%
As advised I have tried using PHP Mailer to send email attachments with a
I am using Ruby on Rails 3.1 and I would like to know how
First is there any technique for using Action Script for recording sound from microphone?
I've been using an Action for obtaining a report's data, as a JSON object,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.