Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

email

  • Loading branch information...
commit 8bc16e59cdc9c5c6c04f97d2ac8200b9c010ca8c 1 parent d278605
@kyungbae authored
View
1  app/controllers/studies_controller.rb
@@ -15,6 +15,7 @@ def create
@study = Study.new(params[:study])
if @study.save
NoticeMailer.notice_to_doc(@study).deliver
+ NoticeMailer.confirmation_to_sender(@study).deliver
redirect_to @study, :notice => "Successfully created study."
else
render :action => 'new'
View
5 app/mailers/notice_mailer.rb
@@ -4,4 +4,9 @@ def notice_to_doc(study)
@study = study
mail(:to => 'kyungbae@gmail.com', :subject => "You got a new DICOM file", :from => 'kyungbae@seededu.com')
end
+
+ def confirmation_to_sender(study)
+ @study = study
+ mail(:to => @study.email, :subject => "Confirmation of Your Upload", :from => 'info@nohope.com')
+ end
end
View
12 app/views/notice_mailer/confirmation_to_sender.html.erb
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ </head>
+ <body>
+ <h1>Hello,</h1>
+ <p>
+ We got a DICOM file of <%= @study.name %>.<br/>
+ </p>
+ </body>
+</html>
Please sign in to comment.
Something went wrong with that request. Please try again.