Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
38391b7e96
|
@ -66,8 +66,8 @@ class Mailer < ActionMailer::Base
|
|||
subject = "[ #{user.show_name} : #{l(:label_day_mail)}]"
|
||||
@subject = " #{user.show_name} : #{date_to} #{l(:label_day_mail)}"
|
||||
|
||||
date_from = "#{date_from} 23:59:59"
|
||||
date_to = "#{date_to} 23:59:59"
|
||||
date_from = "#{date_from} 17:59:59"
|
||||
date_to = "#{date_to} 17:59:59"
|
||||
|
||||
# 生成token用于直接点击登录
|
||||
@user = user
|
||||
|
@ -122,11 +122,11 @@ class Mailer < ActionMailer::Base
|
|||
end
|
||||
end
|
||||
# 查询user在课程中发布的通知,项目中发的新闻
|
||||
@course_news = News.find_by_sql("select DISTINCT n.* from news n
|
||||
@course_news = (course_ids && !course_ids.empty?) ? News.find_by_sql("select DISTINCT n.* from news n
|
||||
where n.course_id in (#{course_ids})
|
||||
and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||
@project_news = News.find_by_sql("select DISTINCT n.* from news n where n.project_id in (#{project_ids})
|
||||
and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||
and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc") : []
|
||||
@project_news = (project_ids && !project_ids.empty?) ? News.find_by_sql("select DISTINCT n.* from news n where n.project_id in (#{project_ids})
|
||||
and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc") : []
|
||||
|
||||
# 查询user在课程及个人中留言
|
||||
@course_journal_messages = JournalsForMessage.find_by_sql("select DISTINCT * from journals_for_messages where
|
||||
|
|
|
@ -78,9 +78,8 @@
|
|||
# http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer
|
||||
|
||||
|
||||
# default configuration options for all environments
|
||||
|
||||
default:
|
||||
# Outgoing emails configuration (see examples above)
|
||||
email_delivery:
|
||||
delivery_method: :smtp
|
||||
smtp_settings:
|
||||
|
@ -203,6 +202,15 @@ default:
|
|||
production:
|
||||
# CJK support
|
||||
rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
|
||||
email_delivery:
|
||||
delivery_method: :smtp
|
||||
smtp_settings:
|
||||
address: mail.trustie.net
|
||||
port: 25
|
||||
domain: mail.trustie.net
|
||||
authentication: :login
|
||||
user_name: "mail@trustie.net"
|
||||
password: "loong2010"
|
||||
|
||||
# specific configuration options for development environment
|
||||
# that overrides the default ones
|
||||
|
|
Loading…
Reference in New Issue