Initial commit
This commit is contained in:
40
app/mailers/admin_mailer.rb
Normal file
40
app/mailers/admin_mailer.rb
Normal file
@@ -0,0 +1,40 @@
|
||||
class AdminMailer < ApplicationMailer
|
||||
default to: %w(bray@bigmedia.ai lee@bigmedia.ai)
|
||||
|
||||
def new_video(video)
|
||||
@video = video
|
||||
|
||||
mail \
|
||||
subject: "[New Video] #{video.project.account.name} has uploaded a new video"
|
||||
end
|
||||
|
||||
def updated_video_edl_file(video)
|
||||
@video = video
|
||||
@edl_type_updated = "An EDL"
|
||||
|
||||
mail(
|
||||
subject: "[Updated Video EDL File] #{video.project.account.name} has updated the EDL file for #{video.file.filename}",
|
||||
template_name: "updated_video_edl_file"
|
||||
)
|
||||
end
|
||||
|
||||
def updated_video_graphics_only_edl_file(video)
|
||||
@video = video
|
||||
@edl_type_updated = "A Graphics Only EDL"
|
||||
|
||||
mail(
|
||||
subject: "[Updated Video Graphics Only EDL File] #{video.project.account.name} has updated the Graphics Only EDL file for #{video.file.filename}",
|
||||
template_name: "updated_video_edl_file"
|
||||
)
|
||||
end
|
||||
|
||||
def updated_video_audio_only_edl_file(video)
|
||||
@video = video
|
||||
@edl_type_updated = "An Audio Only EDL"
|
||||
|
||||
mail(
|
||||
subject: "[Updated Video Audio Only EDL File] #{video.project.account.name} has updated the Audio Only EDL file for #{video.file.filename}",
|
||||
template_name: "updated_video_edl_file"
|
||||
)
|
||||
end
|
||||
end
|
||||
4
app/mailers/application_mailer.rb
Normal file
4
app/mailers/application_mailer.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
class ApplicationMailer < ActionMailer::Base
|
||||
default from: ENV.fetch("MAILER_FROM_ADDRESS") { "support@bigmedia.ai" }
|
||||
layout "mailer"
|
||||
end
|
||||
26
app/mailers/user_mailer.rb
Normal file
26
app/mailers/user_mailer.rb
Normal file
@@ -0,0 +1,26 @@
|
||||
class UserMailer < ApplicationMailer
|
||||
def password_reset(user)
|
||||
@user = user
|
||||
mail to: @user.email
|
||||
end
|
||||
|
||||
def project_invitation(user, project, user_is_new: false)
|
||||
@user = user
|
||||
@project = project
|
||||
@user_is_new = user_is_new
|
||||
|
||||
mail to: @user.email
|
||||
end
|
||||
|
||||
def welcome(user, account)
|
||||
@user = user
|
||||
@account = account
|
||||
mail to: @user.email
|
||||
end
|
||||
|
||||
def existing_account(user, account)
|
||||
@user = user
|
||||
@account = account
|
||||
mail to: @user.email
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user