Show More
Commit Description:
-- maximum score in range feature --...
Commit Description:
-- maximum score in range feature -- forgot to add two more files (grafted from ef63655e66585dcd55eb583618923ce40a3f5ace)
File last commit:
Show/Diff file:
Action:
lib/mail_helper_methods.rb | 41 lines | 847 B | text/x-ruby | RubyLexer |
Jittat Fakcharoenphol
sends notification emails to users after contest upgrade.
r296 module MailHelperMethods
Jittat Fakcharoenphol
moved send mail code back to helper
r336 def send_mail(mail_to, mail_subject, mail_body)
mail_from = GraderConfiguration['system.online_registration.from']
smtp_server = GraderConfiguration['system.online_registration.smtp']
Jittat Fakcharoenphol
sends notification emails to users after contest upgrade.
r296
if ['fake', 'debug'].include? smtp_server
puts "-------------------------
Jittat Fakcharoenphol
moved send mail code back to helper
r336 To: #{mail_to}
From: #{mail_from}
Subject: #{mail_subject}
#{mail_body}
Jittat Fakcharoenphol
sends notification emails to users after contest upgrade.
r296 --------------------------
"
return true
end
Jittat Fakcharoenphol
moved send mail code back to helper
r336 mail = Mail.new do
from mail_from
to mail_to
subject mail_subject
body mail_body
Jittat Fakcharoenphol
sends notification emails to users after contest upgrade.
r296 end
update mail functionality. Update syntax for mail gem (we might need more options for mail setting?)
r348 mail_option = {
:address => smtp_server,
# :domain => nil,
# :port => 25,
# :user_name => nil,
# :password => nil,
# :authentication=>'plain',
# :enable_starttls_auto => true
}
mail.delivery_method :smtp, mail_option
Jittat Fakcharoenphol
moved send mail code back to helper
r336 mail.deliver
Jittat Fakcharoenphol
sends notification emails to users after contest upgrade.
r296 end
end