Skip to content

Commit

Permalink
add details
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius Rusu committed Jan 29, 2014
1 parent d39be56 commit 748d1c9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/controllers/email_controller.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
class EmailController < ApplicationController

# sample form
def index

end

# send email
def sending
to = params[:toAddress]
subject = params[:subject]
Expand Down
6 changes: 6 additions & 0 deletions app/mailers/sendgrid_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
class SendgridMailer < ActionMailer::Base

# send email using ActionMailer
#
# to String 'to' email address
# subject String subject of email
# body String content of email
#
def email(to, subject, body)
mail(:to => to, :from => 'info@sampleApp.com', :subject => subject) do |format|
format.text { render :text => body }
Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
# end
# resources :posts, concerns: :toggleable
# resources :photos, concerns: :toggleable

# Example resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
Expand Down

0 comments on commit 748d1c9

Please sign in to comment.