Email using ruby on rails

18 views
Skip to first unread message

Manish Belsare

unread,
Mar 12, 2010, 12:54:57 PM3/12/10
to rubyonra...@googlegroups.com
ActionMailer::Base.server_settings = {
:address => "smtp.tutorialspoint.com",
:port => 25,
:domain => "tutorialspoint.com",
:authentication => :login,
:user_name => "username",
:password => "password",
}


Here in this code what shud be the value of "username" and "password"
--
Posted via http://www.ruby-forum.com/.

Aldric Giacomoni

unread,
Mar 12, 2010, 2:23:57 PM3/12/10
to rubyonra...@googlegroups.com
Manish Belsare wrote:
> ActionMailer::Base.server_settings = {
> :address => "smtp.tutorialspoint.com",
> :port => 25,
> :domain => "tutorialspoint.com",
> :authentication => :login,
> :user_name => "username",
> :password => "password",
> }
>
>
> Here in this code what shud be the value of "username" and "password"

I don't know; how do you send email? What are your username and
password? You'll also want to change the address and domain to fit your
needs. If you don't know, ask your IT department, or your ISP, or your
webhost.

Sandip Ransing

unread,
Mar 12, 2010, 4:46:03 PM3/12/10
to rubyonra...@googlegroups.com
username/password are the credentials to your email account.

  # Example smtp gmail settings.

ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
  :address => "smtp.gmail.com",
  :port => 587,
  :authentication => :plain,
  :enable_starttls_auto => true,
  :user_name => "san...@gmail.com",
  :password => "sandip"
}


--
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 rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.




--
Sandip

---
www.funonrails.com



Manish Belsare

unread,
Mar 17, 2010, 11:26:13 AM3/17/10
to rubyonra...@googlegroups.com
You'll also want to change the address and domain to fit your
needs. If you don't know, ask your IT department, or your ISP, or your
webhost.

Sir for your above mentioned thing well is it necessary to know the
domain and address from my ISP??
i cant send an email from my application without this..
Also i would like to mention that the email information is displayed in
the web server but it is not routed to the mentioned email address..so
wat should i do?

Sandip Ransing

unread,
Mar 18, 2010, 2:20:52 AM3/18/10
to rubyonra...@googlegroups.com
Hi Manish,

Is email sending log is getting created inside log file ?
Is tutorialspoint.com is your domain ? If yes, then where smtp setup has been done ?
Why don't you send emails using gmail account ?

Thanks,

--
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 rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.




--
Sandip

---
www.funonrails.com



Manish Belsare

unread,
Mar 18, 2010, 5:07:22 AM3/18/10
to rubyonra...@googlegroups.com

> Why don't you send emails using gmail account ?
>


Sir,
I would surely like to know what i have to make changes in the
environment.rb file..
My email information is available in the development.log file..

Sir my environment.rb file has foll contents:

ActionMailer::Base.delivery_method = :smtp

ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com" ,

:port => 25,
:domain => "gmail.com" ,
:authentication => :login,
:enable_starttls_auto => true,
:user_name => "mukesh" ,
:password => "123456"
}

Here user name is user name created by the user and not email id..
so what schanges chould i make to this file?

Sandip Ransing

unread,
Mar 18, 2010, 6:18:19 AM3/18/10
to rubyonra...@googlegroups.com
Just remove domain from smtp settings and it should work fine Instead we are passing it through username.

ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
  :address => "smtp.gmail.com",
  :port => 587,
  :authentication => :plain,
  :enable_starttls_auto => true,
  :user_name => "muk...@gmail.com",
  :password => "123456"
}

Let me know if still problem!

--
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 rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.




--
Sandip

---
www.funonrails.com



Reply all
Reply to author
Forward
0 new messages