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 151647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:28:58+00:00 2026-05-11T09:28:58+00:00

I’m using my Gmail Apps for Domain account to send email within my rails

  • 0

I’m using my Gmail Apps for Domain account to send email within my rails application for standard automated emails (user signup, forgot password, notify admin of new comment, etc), but I’m worried about the 500 emails per day limit set by Google.

Google suggests one way to overcome the limit is to use multiple user accounts.

So, I’ve setup 10 additional gmail user accounts (noreply1, noreply2, noreply3, etc) – I’d like to track when any of these accounts has sent 500 emails in a 24 hour period and use the idle account accordingly.

How do I dynamically set the :user_name value in ActionMailer::Base.smtp_settings?

Here’s my current setup – NOTE: this sends from ‘noreply1’ every time, even though i’m explicitly setting :user_name and :from to ‘noreply2’:

--- development.rb ---      ActionMailer::Base.delivery_method = :smtp     ActionMailer::Base.smtp_settings = {         :address => 'smtp.gmail.com',         :port => '587',         :domain => 'mydomain.com',            :authentication => :plain,             :user_name => 'noreply1@mydomain.com',         :password => 'password'     }  --- account.rb --- (MODEL, called via a callback) after_create :send_welcome_email ... def send_welcome_email   #ActionMailer::Base.smtp_settings[:user_name] = 'noreply2@mydomain.com'   ActionMailer::Base.smtp_settings.merge!({:user_name => 'noreply2@mydomain.com'})     SubscriptionNotifier.deliver_welcome(self)    end  --- subscription_notifier.rb --- (MODEL)  class SubscriptionNotifier < ActionMailer::Base   def welcome(account)         @sent_on = Time.now     @subject = 'Welcome to the App'     @recipients = account.email     @from = 'noreply2@mydomain.com'      @body = { :account => account }   end end 
  • 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. 2026-05-11T09:28:58+00:00Added an answer on May 11, 2026 at 9:28 am

    You could also set up an MTA on your server and use that for sending the mail.

    That’s what we do.

    You have to add your server’s IP as a valid one for sending email in your domain’s SPF record to avoid getting marked as spam.

    Another benefit of this is that if you do this, you can set the From: address of the email to be one of your users, which you cannot do with GMail.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
In order to apply a triggered animation to all ToolTip s in my app,
I want use html5's new tag to play a wav file (currently only supported
I want to count how many characters a certain string has in PHP, but
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string

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.