ruby-on-railsemailtransactional-email

How to set Cuttlefish.io base URL used in sent mails?


I am using Cuttlefish.io (http://www.cuttlefish.io), and I would like to know how to set the base URL used in links and counter image. By default, the links base URL is:

http://localhost:3000

But I would like to set it to a proper base URL, different to this default base URL.

How to do that?


Solution

  • Found how to do, by adding this to environments' .rb files:

    config.action_mailer.default_url_options = { host: "#{config.cuttlefish_domain}" } 
    

    And then put the value I want in environment thru:

    export CUTTLEFISH_DOMAIN=mydomain