ruby on rails - RoR Mailer issues -


im attempting send email active user when event created. though when doing getting following error

started post "/events" 124.149.85.178 @ sat jul 07 13:15:03 +0200 2012 processing schedulescontroller#create html parameters: {"utf8"=>"✓", "time"=>{"typedatetimeclassrequired"=>""}, "authenticity_token"=>"tntgzq/plggwkh66f74sdwuxcjvkrv0tysfaolumife=", "schedule"=>{"user_id"=>[""], "event"=>"1", "team_id"=>"", "arrival_time"=>"", "time"=>"sat, 07 jul 2012 09:15 pm", "for"=>"", "against"=>"", "home_or_away"=>"", "location_id"=>"", "opponent_id"=>""}, "commit"=>"create schedule"} rendered user_mailer/welcome_email.html.erb (0.4ms) sent mail *******@westnet.com.au (60075ms) completed 500 internal server error in 60213ms timeout::error (execution expired): app/controllers/schedules_controller.rb:59:in `create' app/controllers/schedules_controller.rb:56:in `create' 

i have following in schedule_controller

def create @schedule = schedule.new(params[:schedule]) @user = user.find(current_user) respond_to |format| if @schedule.save usermailer.welcome_email(@user).deliver format.html { redirect_to(schedules_url, :notice => "#{event_display_c(@schedule.event)} created.") } format.json { render :json => @schedule, :status => :created, :location => @schedule } else format.html { render :action => "new" } format.json { render :json => @schedule.errors, :status => :unprocessable_entity } end end 

end

and mailer

 class usermailer < actionmailer::base default :from => "notifications@**********" def welcome_email(user) @user = user @url = "http://example.com/login" mail(:to => user.email, :subject => "welcome awesome site") end end 

looks issue misconfiguration email server. fixing dependent on isp/server host, checkout ruby on rails guides details on set. there's steps configuring server settings if using gmail.


Comments

Popular posts from this blog

JQuery Autocomplete without using label, value, id -

c++ - Accessing inactive union member and undefined behavior? -

JAVA - what is the difference between void and boolean methods? -