I got it working in Insoshi with a migration like this:
class SmtpAuthenticationPreferences < ActiveRecord::Migration
def self.up
add_column :preferences, :smtp_user_name, :string
add_column :preferences, :smtp_password, :string
end
def self.down
remove_column :preferences, :smtp_user_name
remove_column :preferences, :smtp_password
end
end
And editing config/initializers/email_settings.rb like so:
begin
unless test?
global_prefs = Preference.find(:first)
if global_prefs.email_notifications?
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => global_prefs.smtp_server,
:port => 25,
:domain => global_prefs.domain,
:user_name => global_prefs.smtp_user_name,
:password => global_prefs.smtp_password,
:authentication => :login
}
end
end
rescue
# Rescue from the error raised upon first migrating
# (needed to bootstrap the preferences).
nil
end
On Mon, Sep 28, 2009 at 1:52 AM, Dan B <[email protected]> wrote:
>
> Please refer to this link:
> http://douglasfshearer.com/blog/gmail-smtp-with-ruby-on-rails-and-actionmailer
>
> On Sep 27, 4:49 pm, Ivan <[email protected]> wrote:
> > Hey there, thank you for your help with getting this installed, now
> > i've run into another problem. My SMTP server requires
> > authentication, and I think thats why inshoshi isnt able to send any
> > emails out. Is there a way to include credentials into the smtp link
> > or some kind of work around that anyone knows of?
> >
>
--~--~---------~--~----~------------~-------~--~----~
Insoshi developer site: http://dogfood.insoshi.com/
Insoshi documentation: http://docs.insoshi.com/
You received this message because you are subscribed to the Google
Groups "Insoshi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/insoshi?hl=en
-~----------~----~----~----~------~----~------~--~---