Send mail via GMail

320 views
Skip to first unread message

dragonyy

unread,
Sep 9, 2010, 3:43:21 AM9/9/10
to god.rb
Hi! I'm new to God. After a long search on the Web, I found some
articles telling how to configure god to send notification via GMail
like

http://millarian.com/programming/ruby-on-rails/monitoring-thin-using-god-with-google-apps-notifications/

or

http://d.hatena.ne.jp/dharry/20100216/1266331869

However, when I really use god 0.11.0 version, I found that

God::Contacts::Email.message_settings is missing! And
God::Contacts::Email.server_settings is also missing! It seems the API
of god itself has changed. And I can't find any newer information
about how to send mail via GMail or figure it out how in god's
website.

Is there anyone who can configure this in god 0.11.0? Thanks in
advance.

captainf

unread,
Sep 9, 2010, 11:10:14 AM9/9/10
to god.rb
Read the "email" part on the website http://god.rubyforge.org
see that God::Contacts::Email.server_settings has been removed in the
recent release of god.
God::Contacts::Email.server_settings = {
:address => 'smtp.gmail.com',
:tls => 'true',
:port => 587,
:domain => 'domain.com',
:user_name => 'us...@domain.com',
:password => '******',
:authentication => :plain
}

translates to
God::Contacts::Email.defaults do |d|
d.delivery_method = :smtp
d.server_host = 'smtp.gmail.com'
d.server_port = 587
d.server_auth = true
d.server_domain = 'domain.com'
d.server_user = 'us...@domain.com'
d.server_password = '******'
end

dragonyy

unread,
Sep 10, 2010, 2:28:12 AM9/10/10
to god.rb
Thanks for your comment. Yesterday I tried this subject and got a
working config:

* gem install tlsmail
* add "Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE)" in the email
part of god's config
* just like your translation from old to new, however, the
"d.server_auth" part should be ":login"

I guess step 3 is not documented well by the author; but in fact that
would be one argument to Net::SMTP

On 9月9日, 下午7時10分, captainf <capta...@dds.nl> wrote:
> Read the "email" part on the websitehttp://god.rubyforge.org
> see that God::Contacts::Email.server_settings has been removed in the
> recent release of god.
> God::Contacts::Email.server_settings = {
>   :address        => 'smtp.gmail.com',
>   :tls            => 'true',
>   :port           => 587,
>   :domain         => 'domain.com',
>   :user_name      => 'u...@domain.com',
>   :password       => '******',
>   :authentication => :plain
>
> }
>
> translates to
> God::Contacts::Email.defaults do |d|
>   d.delivery_method = :smtp
>   d.server_host = 'smtp.gmail.com'
>   d.server_port = 587
>   d.server_auth = true
>   d.server_domain = 'domain.com'
>   d.server_user = 'u...@domain.com'
>   d.server_password = '******'
> end
Reply all
Reply to author
Forward
0 new messages