pentestgeek/phishing-frenzy — pull request #41 by dalton (2013-11-14 18:46:23+00:00)
Title: Campaign mailer

Note - This branch includes my previous commit for the Apache Status in global settings. I'll improve my workflow going forward to isolate PRs.

I created a new mailer for campaigns. It is in app/mailers even though it is just a PORO and not an ActiveMailer. For the most part I just moved the code from the email controller to this class, breaking up the send_email and read_email methods in the process.

I also added a new #test! that is different from #launch! by only sending to a test_victim. The test victim is created from a new test_email string column in the campaigns table. Now when you send a test email, it only sends it to this victim, not the entire list of victims.

I played around a little with the application flow so when you send a test email, it redirects back to the options page. Launching emails still going to the send view.

Finally, I changed the name of the Victims class to Victim, and now the associations work.