Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -233,18 +233,18 @@ GEM
net-smtp (0.5.1)
net-protocol
nio4r (2.7.4)
nokogiri (1.18.3)
nokogiri (1.18.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.18.3-aarch64-linux-gnu)
nokogiri (1.18.4-aarch64-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.3-arm-linux-gnu)
nokogiri (1.18.4-arm-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.3-arm64-darwin)
nokogiri (1.18.4-arm64-darwin)
racc (~> 1.4)
nokogiri (1.18.3-x86_64-darwin)
nokogiri (1.18.4-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.18.3-x86_64-linux-gnu)
nokogiri (1.18.4-x86_64-linux-gnu)
racc (~> 1.4)
orm_adapter (0.5.0)
pg (1.5.9)
Expand Down
1 change: 0 additions & 1 deletion app/mailers/application_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
class ApplicationMailer < ActionMailer::Base
default from: 'bearriver-questions@umich.edu'
layout 'mailer'
end
12 changes: 12 additions & 0 deletions app/mailers/test_mailer.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class TestMailer < ApplicationMailer
def test_email(recipient_email = nil)
@message = 'This is a test email from LSA Evaluate to verify email configuration.'
@sender = Rails.application.config.mailer_sender
@reply_to = 'lsa-wads-rails-email-test@umich.edu'

mail(
to: recipient_email || 'lsa-wads-rails-email-test@umich.edu',
subject: 'Test Email from LSA Evaluate'
)
end
end
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
<!DOCTYPE html>
<html lang="en">
</html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body>
<p>
<%= @current_application_settings.application_confirm_email_message %>
</p>
<p>
<%= link_to "Bear River Conference site", "https://lsa.umich.edu/bearriver" %>
</p>
<p>Thank you,</p>
</body>
</html>
<p>
<%= @current_application_settings.application_confirm_email_message %>
</p>
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
<p>
<%= @current_application_settings.application_confirm_email_message %>
</p>
<p>
<%= link_to "Bear River Conference site", "https://lsa.umich.edu/bearriver" %>
</p>
<p>Thank you,</p>
<%= @current_application_settings.application_confirm_email_message %>
21 changes: 6 additions & 15 deletions app/views/balance_due_mailer/outstanding_balance.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body>
<p>
<%= @current_application_settings.balance_due_email_message %>
</p>
<p>
<%= link_to "Bear River site", payments_url %>
</p>
<p>Thank you,</p>
</body>
</html>
<p>
<%= @current_application_settings.balance_due_email_message %>
</p>
<p>
<%= link_to "Bear River payments", payments_url %>
</p>
4 changes: 1 addition & 3 deletions app/views/balance_due_mailer/outstanding_balance.text.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<%= @current_application_settings.balance_due_email_message %>

<%= link_to "Bear River site", payments_url %>

Thank you,
Bear River payments https://bearriver.lsa.umich.edu
64 changes: 54 additions & 10 deletions app/views/layouts/mailer.html.erb
Original file line number Diff line number Diff line change
@@ -1,19 +1,63 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<style type="text/css">
/* Email styles need to be inline */
</style>
</head>
<body>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<style>
body {
font-family: Arial, sans-serif;
color: #333;
line-height: 1.5;
}
.container {
max-width: 600px;
margin: 0 auto;
padding: 20px;
}
.header {
padding-bottom: 20px;
border-bottom: 1px solid #eee;
margin-bottom: 20px;
}
.logo {
max-width: 150px;
}
h1, h2, h3 {
color: #1a5a96;
margin-top: 20px;
}
.footer {
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid #eee;
font-size: 0.8em;
color: #666;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<!-- Optional logo -->
<!-- <img src="[LOGO_URL]" alt="University Logo" class="logo"> -->
<h1>Bear River Writers' Conference</h1>
</div>

<%= yield %>

<hr>
<h4>Bear River Writers' Conference</h4>
<h4><%= link_to "Bear River Writers' Conference", "https://lsa.umich.edu/bearriver" %></h4>
<p>
3187 Angell Hall<br>
435 South State Street<br>
Ann Arbor, MI 48109-1003
</p>
</body>
</html>
<p>
If you have any questions, please contact <%= mail_to "bearriver-questions@umich.edu", "bearriver-questions@umich.edu" %>
</p>
<div class="footer">
<p>This is an automated email. Please do not reply to this message.</p>
<p>&copy; <%= Date.today.year %> <%= link_to "The Regents of the University of Michigan", "https://regents.umich.edu" %> | All Rights Reserved</p>
</div>
</div>
</body>
</html>
14 changes: 12 additions & 2 deletions app/views/layouts/mailer.text.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<%= yield %>
Bear River Writers' Conference
=============================

<%= yield %>

Bear River Writers' Conference - https://lsa.umich.edu/bearriver
3187 Angell Hall
435 South State Street
Ann Arbor, MI 48109-1003
Ann Arbor, MI 48109-1003

If you have any questions, please contact bearriver-questions@umich.edu

---
This is an automated email. Please do not reply to this message.
© <%= Date.today.year %> The Regents of the University of Michigan | All Rights Reserved
22 changes: 7 additions & 15 deletions app/views/lottery_mailer/lost_lottery_email.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body>
<h4>
Hello <%= @application.first_name %> <%= @application.last_name %>,
</h4>
<p>
<%= @lottery_lost_mail_body %>
</p>
<p>We thank you for your interest in Bear River.</p>
</body>
</html>
<p>
Hello <%= @application.first_name %> <%= @application.last_name %>,
</p>
<p>
<%= @lottery_lost_mail_body %>
</p>
<p>We thank you for your interest in Bear River.</p>
28 changes: 10 additions & 18 deletions app/views/lottery_mailer/pre_lottery_offer_email.html.erb
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body>
<h4>
Congratulations <%= @application.first_name %> <%= @application.last_name %>!
</h4>
<p>
<%= @special_offer_invite_email_body %>
</p>
<p>
<%= link_to "Accept Offer", accept_offer_url %>
</p>
<p>We look forward to you joining us at Bear River!</p>
</body>
</html>
<p>
Congratulations <%= @application.first_name %> <%= @application.last_name %>!
</p>
<p>
<%= @special_offer_invite_email_body %>
</p>
<p>
<%= link_to "Accept Offer", accept_offer_url %>
</p>
<p>We look forward to you joining us at Bear River!</p>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ Congratulations <%= @application.first_name %> <%= @application.last_name %>!

<%= @special_offer_invite_email_body %>

<%= link_to "Accept Offer", accept_offer_url %>
Accept Offer -> https://bearriver.lsa.umich.edu/accept_offer

We look forward to you joining us at Bear River!
28 changes: 10 additions & 18 deletions app/views/lottery_mailer/waitlisted_offer_email.html.erb
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body>
<h4>
Congratulations <%= @application.first_name %> <%= @application.last_name %>!
</h4>
<p>
<%= @special_offer_invite_email_body %>
</p>
<p>
<%= link_to "Accept Offer", accept_offer_url %>
</p>
<p>We look forward to you joining us at Bear River!</p>
</body>
</html>
<p>
Congratulations <%= @application.first_name %> <%= @application.last_name %>!
</p>
<p>
<%= @special_offer_invite_email_body %>
</p>
<p>
<%= link_to "Accept Offer", accept_offer_url %>
</p>
<p>We look forward to you joining us at Bear River!</p>
2 changes: 1 addition & 1 deletion app/views/lottery_mailer/waitlisted_offer_email.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ Congratulations <%= @application.first_name %> <%= @application.last_name %>!

<%= @special_offer_invite_email_body %>

<%= link_to "Accept Offer", accept_offer_url %>
Accept Offer -> https://bearriver.lsa.umich.edu/accept_offer

We look forward to you joining us at Bear River!
31 changes: 10 additions & 21 deletions app/views/lottery_mailer/won_lottery_email.html.erb
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body>
<h4>
Congratulations <%= @application.first_name %> <%= @application.last_name %>!
</h4>
<p>
<%= @lottery_won_mail_body %>
</p>
<p>
<%= link_to "Accept Offer", accept_offer_url %>
</p>
<p>
We look forward to you joining us at Bear River!
</p>
</body>
</html>

<p>
Congratulations <%= @application.first_name %> <%= @application.last_name %>!
</p>
<p>
<%= @lottery_won_mail_body %>
</p>
<p>
<%= link_to "Accept Offer", accept_offer_url %>
</p>
<p>We look forward to you joining us at Bear River!</p>
23 changes: 7 additions & 16 deletions app/views/lottery_mailer/won_lottery_email.text.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body>
<h4>
Congratulations #{@application.first_name} #{@application.last_name}!
</h4>
<%= @lottery_won_mail_body %>
<%= link_to "Accept Offer", accept_offer_url %>
<p>
We look forward to you joining us at Bear River!
</p>
</body>
</html>
Congratulations #{@application.first_name} #{@application.last_name}!

<%= @lottery_won_mail_body %>

Accept Offer -> https://bearriver.lsa.umich.edu/accept_offer

We look forward to you joining us at Bear River!
14 changes: 14 additions & 0 deletions app/views/test_mailer/test_email.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<h1>Email Configuration Test</h1>

<p><%= @message %></p>

<p>This message confirms your email settings are working correctly.</p>

<h2>Email Configuration:</h2>
<ul>
<li><strong>From:</strong> <%= @sender %></li>
<li><strong>Reply-To:</strong> <%= @reply_to %></li>
</ul>

<p>This is a system-generated email. Please do not reply directly to this message.</p>
<p>If you need assistance, please contact <a href="mailto:<%= @reply_to %>"><%= @reply_to %></a>.</p>
13 changes: 13 additions & 0 deletions app/views/test_mailer/test_email.text.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Email Configuration Test
======================

<%= @message %>

This message confirms your email settings are working correctly.

Email Configuration:
- From: <%= @sender %>
- Reply-To: <%= @reply_to %>

This is a system-generated email. Please do not reply directly to this message.
If you need assistance, please contact <%= @reply_to %>.
2 changes: 1 addition & 1 deletion config/credentials.yml.enc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dt7x+sHj4pT6dmwKsRVXdQFRm3Fyon724KTPW96OXnx6GDQ38i9cK9k24gDAi2+Kb37iyhrlyqTR8gghGIMJTs5kx87lVr1I/socltpl4byqi8CecDxKxSDFNXRh+B9U9XRejucIF6FPNc6KzI/5ybpgFPwy82mZEmWO+VH5eDuwe8JEqbtkmZKzLeALsD2EKuQyGbFb32MZnUVTOYmC6S93ThJSYbwevYH5H4FH6NLjmHzD8d1AjYWh/B9pvO7ys1hm1P05yF0A8QC6bDMLblH29ZAIs0eWhKN0a6Ae+bionPqSP98MhUWgRhb2VDAUXdGTtT60ALy6jbpxyVHCEzIn/1yY7SYcVOhSNTROIhKiEN008aonzexFgxFfYjuJoMCFb5JmD4+Kg8oRPoXB3hRnm9JNMDJpBToJvgWPxSZNKUWdv0zywS6TEdWBrDACb1ejow015MpjC5z8iomx/dm3eCXLF3X72QKwc7QQ2y1L6lHzlQj0v4TlmmBaY8kzLVOlR/PPlq3r/UK+P9Wj9Z9cLFXF3TiHaLgLtgtWfD9VeVqu8AHJ+bRZEWPmJA2cQULEcw4bH5sI5MoBvtsGJKMdGGH8+WzslGVZFBTzHSPqdv6gmdmWCoWBjBsbXFbVxqvclE8djrnJXSKMO6zzJDUlJv0hrWiUgjQ5xgcTdD74xF+2K5OJXQN1HdbGS0fafjainXpOdyzMIvzRGlt5iq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IKVbQPexOZ4yEN+2AZm+W2sJxbjk1YkAj9eFsC1Nt3oapOHZkOqqYA/QUQXJ5gzj1a51LcY/efM3Rwd90q3LaFPRfLNxfmHrtWHXvciROScKih2r6hHMbtNEAtaPbz3r7BICI+ALCgNflbiPfJZesDUvEE3RTbj+WzpWeTzJY7xT4lBsrSJT7uKz74Sp0rmSL4aHRI3rsj6YnZEIxPHzQ==--vF6peKEukVgJhOM9--mB45egvWtI47mU9i1SeB4A==
6 changes: 6 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
# on staging use host = 'http://STAGING SERVER NAME'
config.action_mailer.default_url_options = { host: host }

config.mailer_sender = Rails.application.credentials.dig(:devise, :mailer_sender)
config.action_mailer.default_options = {
from: config.mailer_sender,
reply_to: 'bearriver-questions@umich.edu'
}

# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = true

Expand Down
Loading