Initial commit

This commit is contained in:
Yaser
2026-08-13 19:56:46 +03:30
commit de1d57a67b
474 changed files with 43185 additions and 0 deletions

23
lib/tasks/mailer.rake Normal file
View File

@@ -0,0 +1,23 @@
# frozen_string_literal: true
require 'ostruct'
namespace 'mailer' do
desc 'Generate email to the user with UID'
task :send, [:uid] => [:environment] do |_t, args|
record = OpenStruct.new
record.user = User.find_by(uid: args[:uid])
record.domain = 'barong.io'
record.token = 'TEST_TOKEN'
params = {
subject: 'Test Message',
template_name: 'email_confirmation.en.html.erb',
record: record,
changes: nil,
user: User.first
}
Postmaster.process_payload(params).deliver_now
end
end