Closed mlfreer closed 10 years ago
@PashaPodolsky What would you like to know?
As a start, Mailers work like controllers, setting up locals (instance variables) to pass on to templates to be filled. I've got maildown
in the Gemfile to allow us to have some "pretty" HTML e-mails just using markdown. So you can still use ERB in the Markdown templates, and you can look at the custom devise mails in app/views/user_mailer
.
@mlfreer If you want me to implement this, could you get from Ginny what she would like for standard mail texts for invitations and refresh?
If Pasha gets to it sooner, I'd just create an ExperimentSessionMailer
or whatever, and define actions inside for invite
and refresh
. Then, markdown/ERB templates would go in app/views/experiment_session_mailer
.
Lastly, you'll want to call these mailers in some fashion, probably from a controller action under experiments and administration dashboard, respectively. See section 2.10.
This is the standard text for the email:
Hello name of subject!
You are being invited to participate in an experiment in which you will make economic decisions. In addition to your cash earnings from the experiment, you will be paid a on-time bonus of $#showup for showing up on time.
The session(s) is scheduled for the following time(s):
link to the list of sessions
If you want to participate in one of the sessions, you can register by clicking on this link: #link#
Thank you for signing up to receive information about our experiments. If you have any questions about this experiment, please reply directly to this invitation.
We hope to see you soon!
Sincerely, ICES Experimenter
refreshing text:
The Department of Economics and the Interdisciplinary Center for Economic Science (ICES) invite you to sign up to participate in economics experiments. All participants earn cash for participating. You are guaranteed a show-up bonus for coming, and based on the decisions you make, you can possibly earn much more.
If you have NEVER signed up before and want to participate in economic experiments, please fill out the registration form at: link to the registration form. You’ll begin receiving emails as soon as experiments start. When you receive an invitation, please confirm you’ll show up 10 to 15 minutes before the experiment starts.
If you are already signed up, you need to update your account link to the profile of the subject! You'll receive emails as experiments start.
If you have additional questions, please feel free to check out our Frequently Asked Questions page (link to FAQ).
Set up e-mail sendingwith standard texts for:
Do it on your own or explain to Paul the current settings of the mailer