dawarich/app/mailers/users_mailer.rb

46 lines
1.1 KiB
Ruby
Raw Normal View History

2025-08-13 14:25:48 -04:00
# frozen_string_literal: true
class UsersMailer < ApplicationMailer
def welcome
# Sent after user signs up
2025-08-13 14:25:48 -04:00
@user = params[:user]
2025-08-19 12:31:37 -04:00
mail(to: @user.email, subject: 'Welcome to Dawarich!')
2025-08-13 14:25:48 -04:00
end
def explore_features
# Sent 2 days after user signs up
2025-08-13 14:25:48 -04:00
@user = params[:user]
2025-08-19 12:31:37 -04:00
mail(to: @user.email, subject: 'Explore Dawarich features!')
2025-08-13 14:25:48 -04:00
end
def trial_expires_soon
# Sent 2 days before trial expires
2025-08-13 14:25:48 -04:00
@user = params[:user]
2025-08-19 12:31:37 -04:00
mail(to: @user.email, subject: '⚠️ Your Dawarich trial expires in 2 days')
2025-08-13 14:25:48 -04:00
end
def trial_expired
# Sent when trial expires
2025-08-13 14:25:48 -04:00
@user = params[:user]
2025-08-19 12:31:37 -04:00
mail(to: @user.email, subject: '💔 Your Dawarich trial expired')
2025-08-13 14:25:48 -04:00
end
2025-09-05 13:39:50 -04:00
def post_trial_reminder_early
# Sent 2 days after trial expires
2025-09-05 13:39:50 -04:00
@user = params[:user]
mail(to: @user.email, subject: '🚀 Still interested in Dawarich? Subscribe now!')
end
def post_trial_reminder_late
# Sent 7 days after trial expires
2025-09-05 13:39:50 -04:00
@user = params[:user]
mail(to: @user.email, subject: '📍 Your location data is waiting - Subscribe to Dawarich')
end
2025-08-13 14:25:48 -04:00
end