Sha256: 30ecbf77f90b310c0f3c3776c5256b2a6895c044ecafb82bb0acebf9ecd28475

Contents?: true

Size: 1.03 KB

Versions: 18

Compression:

Stored size: 1.03 KB

Contents

class SocialMailerController < ApplicationController
  include ShareLayouts::Controllers::ActionController
  trusty_layout "default", {:only => :create_social_mail}
  #  no_login_required
  skip_before_action :authenticate_user!

  def create_social_mail

    mailer_options = {
      :to => params[:to],
      :from => params[:from],
      :from_name => params[:from_name],
      :message => params[:message],
      :subject => params[:subject]
    }

    if verify_recaptcha(action: 'emailSeats')
      RadSocialMailer.social_mail(mailer_options).deliver_now
      head :ok
    else
      head :bad_request, :ErrorMsg => 'We have detected suspicious activity and have disabled this feature for your user.'
    end

  end

  def social_mail_form
    render :template => "rad_social_mailer/social_mail_form",
           :layout => false,
           :locals => {
             :email_message => params[:email_message],
             :email_subject => params[:email_subject],
             :email_action_url => params[:email_action_url]
           }
  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
trusty-cms-4.1.2 app/controllers/social_mailer_controller.rb
trusty-cms-4.1.1 app/controllers/social_mailer_controller.rb
trusty-cms-4.1.0 app/controllers/social_mailer_controller.rb
trusty-cms-4.0.2 app/controllers/social_mailer_controller.rb
trusty-cms-3.9.7 app/controllers/social_mailer_controller.rb
trusty-cms-3.9.6 app/controllers/social_mailer_controller.rb
trusty-cms-3.9.5 app/controllers/social_mailer_controller.rb
trusty-cms-4.0.1 app/controllers/social_mailer_controller.rb
trusty-cms-3.9.4 app/controllers/social_mailer_controller.rb
trusty-cms-3.9.3 app/controllers/social_mailer_controller.rb
trusty-cms-3.9.2 app/controllers/social_mailer_controller.rb
trusty-cms-4.0.0 app/controllers/social_mailer_controller.rb
trusty-cms-3.9.1 app/controllers/social_mailer_controller.rb
trusty-cms-3.9.0 app/controllers/social_mailer_controller.rb
trusty-cms-3.8.4 app/controllers/social_mailer_controller.rb
trusty-cms-3.8.3 app/controllers/social_mailer_controller.rb
trusty-cms-3.8.2 app/controllers/social_mailer_controller.rb
trusty-cms-3.8.1 app/controllers/social_mailer_controller.rb