Class | MailSpecificationController |
In: |
app/controllers/mail_specification_controller.rb
|
Parent: | ApplicationController |
Method is used to edit the sendmail settings and renders the sendmail form.
# File app/controllers/mail_specification_controller.rb, line 44 44: def edit_sendmail 45: @sendmail_old = params[:sendmail] 46: render :partial => "sendmail_form" 47: end
Method is used to edit the smtp settings and renders the smtp form.
# File app/controllers/mail_specification_controller.rb, line 38 38: def edit_smtp 39: @smtp_old = params[:smtp] 40: render :partial => "smtp_form" 41: end
Method is used to save the sendmail settings.
# File app/controllers/mail_specification_controller.rb, line 50 50: def save_sendmail_settings 51: str = MailSpecification.validate_sendmail_specification(params[:sendmail]) 52: if str.length < 1 53: MailSpecification.save_sendmail_specification(params[:sendmail]) 54: else 55: sendmail = MailSpecification.sendmail_specification_hash(params[:sendmail]) 56: flash[:sendmail_errors] = str 57: end 58: redirect_to :controller => 'admin', :action => 'configuration', :sendmail => sendmail 59: end
Method is used to save the smtp settings.
# File app/controllers/mail_specification_controller.rb, line 62 62: def save_smtp_settings 63: str = MailSpecification.validate_smtp_specification(params[:smtp]) 64: if str.length < 1 65: MailSpecification.save_smtp_specification(params[:smtp]) 66: else 67: smtp = MailSpecification.smtp_specification_hash(params[:smtp]) 68: flash[:smtp_errors] = str 69: end 70: redirect_to :controller => 'admin', :action => 'configuration', :smtp => smtp 71: end
Method is used to render the sendmail settings form.
# File app/controllers/mail_specification_controller.rb, line 26 26: def sendmail_form 27: @sendmail_old = MailSpecification.sendmail_specification_hash 28: render :partial => "sendmail_form" 29: end