Reputation: 6053
I am using Rails Action Mailers to send mails. I am successfully able to send emails to individual id's. I want to send email to a google group so that it mails all the people subscribed to that group. If I just email the group using my gmail account, all subscribers get the email but not through Action Mailer. Console output looks like it did send but unfortunately subscribers are not getting it.
#<Mail::Message:70252634244300, Multipart: false, Headers: <Date: Fri, 12 Jul 2013 14:02:04 -0500>, <From: [email protected]>, <To: <google-group>@gmail.com>, <Message-ID: <[email protected]>>, <Subject: Welcome!>, <Mime-Version: 1.0>, <Content-Type: text/html>, <Content-Transfer-Encoding: quoted-printable>>
Mailer
class BlahMailer < ActionMailer::Base
default from: "[email protected]"
def welcome_email
@mail = "[email protected]"
@tweets = Twitter.user_timeline("tweettest").first.text
mail(to: @mail, subject: 'Welcome!')
end
If I replace [email protected]
with an indvidual's id, it works fine.
Upvotes: 1
Views: 672
Reputation: 6053
Figured it out. The google group belongs to the organization whereas I was trying to send email from a regular gmail account. Changed the group settings to allow external accounts to post to it and it worked.
Upvotes: 1