When you decide to set a default :host for your mailers  then you need to make sure to use the only_path: false option when using url_for Since the url_for view helper will generate relative URLs by default when a :host option isn’t explicitly provided  passing only_path: false will ensure that absolute URLs are generated