2025-08-13 14:25:48 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
|
|
class UsersMailer < ApplicationMailer
|
|
|
|
|
def welcome
|
|
|
|
|
@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
|
|
|
|
|
@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
|
|
|
|
|
@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
|
|
|
|
|
@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
|
|
|
|
|
@user = params[:user]
|
|
|
|
|
|
|
|
|
|
mail(to: @user.email, subject: '🚀 Still interested in Dawarich? Subscribe now!')
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def post_trial_reminder_late
|
|
|
|
|
@user = params[:user]
|
|
|
|
|
|
|
|
|
|
mail(to: @user.email, subject: '📍 Your location data is waiting - Subscribe to Dawarich')
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def subscription_expires_soon_early
|
|
|
|
|
@user = params[:user]
|
|
|
|
|
|
|
|
|
|
mail(to: @user.email, subject: '⚠️ Your Dawarich subscription expires in 14 days')
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def subscription_expires_soon_late
|
|
|
|
|
@user = params[:user]
|
|
|
|
|
|
|
|
|
|
mail(to: @user.email, subject: '🚨 Your Dawarich subscription expires in 2 days')
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def subscription_expired_early
|
|
|
|
|
@user = params[:user]
|
|
|
|
|
|
|
|
|
|
mail(to: @user.email, subject: '💔 Your Dawarich subscription expired - Reactivate now')
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def subscription_expired_late
|
|
|
|
|
@user = params[:user]
|
|
|
|
|
|
|
|
|
|
mail(to: @user.email, subject: '📍 Missing your location insights? Renew Dawarich subscription')
|
|
|
|
|
end
|
2025-08-13 14:25:48 -04:00
|
|
|
end
|