ask module: send mail on development
This commit is contained in:
parent
467c2e8a3c
commit
8541033ba9
|
@ -21,7 +21,7 @@ Orbit::Application.configure do
|
|||
config.active_support.deprecation = :log
|
||||
|
||||
# Only use best-standards-support built into browsers
|
||||
config.action_dispatch.best_standards_support = :builtin
|
||||
config.action_dispatch.best_standards_support = :builtin
|
||||
|
||||
# config.cache_store = :mem_cache_store
|
||||
|
||||
|
@ -33,17 +33,16 @@ Orbit::Application.configure do
|
|||
# :email_prefix => "[R4_error]",
|
||||
# :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
|
||||
|
|
Reference in New Issue