ask module: send mail on development
This commit is contained in:
parent
467c2e8a3c
commit
8541033ba9
|
@ -34,16 +34,15 @@ Orbit::Application.configure do
|
|||
# :sender_address => %{"notifier" <redmine@rulingcom.com>},
|
||||
# :exception_recipients => %w{chris@rulingcom.com}
|
||||
|
||||
# config.action_mailer.delivery_method = :smtp
|
||||
# config.action_mailer.smtp_settings = {
|
||||
# :tls => true,
|
||||
# :enable_starttls_auto => true,
|
||||
# :address => "smtp.gmail.com",
|
||||
# :port => '587',
|
||||
# :domain => "smtp.gmail.com",
|
||||
# :authentication => "plain",
|
||||
# :user_name => "redmine@rulingcom.com",
|
||||
# :password => "rulingredmine" }
|
||||
config.action_mailer.delivery_method = :smtp
|
||||
config.action_mailer.smtp_settings = {
|
||||
:enable_starttls_auto => true,
|
||||
:address => "smtp.gmail.com",
|
||||
:port => '587',
|
||||
:domain => "smtp.gmail.com",
|
||||
:authentication => "plain",
|
||||
:user_name => "redmine@rulingcom.com",
|
||||
:password => "rulingredmine" }
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ class Panel::Ask::BackEnd::AskRepliesController < OrbitBackendController
|
|||
@ask_question.ask_reply = AskReply.new(params[:ask_reply])
|
||||
@ask_question.save
|
||||
if @ask_question.ask_reply.send_email?
|
||||
::AskMailer.reply(@ask_question).deliver
|
||||
Resque.enqueue(SendAskReplyMail, @ask_reply.ask_question.id)
|
||||
end
|
||||
redirect_to panel_ask_back_end_ask_questions_path, notice: t('ask.reply_success')
|
||||
end
|
||||
|
@ -22,7 +22,7 @@ class Panel::Ask::BackEnd::AskRepliesController < OrbitBackendController
|
|||
@ask_reply = AskReply.find(params[:id])
|
||||
@ask_reply.update_attributes(params[:ask_reply])
|
||||
if @ask_reply.send_email?
|
||||
Resque.enqueue(SendAskReplyMail, @reply.ask_question.id)
|
||||
Resque.enqueue(SendAskReplyMail, @ask_reply.ask_question.id)
|
||||
end
|
||||
redirect_to panel_ask_back_end_ask_questions_path, notice: t('ask.reply_success')
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue