Sha256: a2ab06633adaff8a49242fd8069225a0d8b6acf937d2ee2718b42cdb94470ec9
Contents?: true
Size: 456 Bytes
Versions: 7
Compression:
Stored size: 456 Bytes
Contents
class UcbRails::Admin::EmailTestController < UcbRails::Admin::BaseController def index end EMAIL_REGEXP = /\A[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}\z/ def send_email email = params[:email] if email =~ EMAIL_REGEXP @email_result = UcbRails::TestMailer.test(email).deliver flash.now[:success] = 'Email sent.' else flash.now[:error] = 'Invalid email address' end render 'index' end end
Version data entries
7 entries across 7 versions & 1 rubygems