i believe gmail rewrites the from address to help prevent spam. you
can test this using outlook, thunderbird, etc.
i think they want you to set the reply to address.
On Sep 16, 7:38 am, Vipin Vm
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> Hi All,
>
> Am trying to send email through gmail in rails. Its working fine. My
> issue is @from is not working. I have assigned @from =
''a...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org''
> in my emailer.rb and :user_name =>
"w...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" in my
> environment.rb file. When i receive mail, from id is
"w...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
> not "a...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org". When its not
gmail and port is 25 its works fine.
>
> class Emailer < ActionMailer::Base
> def sendmail(subject, email, sent_at, name, message)
> @from =
''a...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org''
> @subject = subject
> @recipients = email
> @sent_on = sent_at
> @body["name"] = name
> @body["message"] = message
> end
> end
>
> ActionMailer::Base.delivery_method = :smtp
> require ''smtp_tls''
>
> ActionMailer::Base.smtp_settings = {
> :address => "smtp.gmail.com",
> :port => 587,
> :domain => "www.google.com",
> :user_name =>
"w...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org",
> :password => "mypassword",
> :authentication => :plain
>
> }
>
> Thanks in advance :)
>
> Vipin
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---