Action Mailer attachment as URL code example
Example: Action Mailer attachment as URL
def job_apply(current_tenant, applicant)
@current_tenant = current_tenant
@applicant = applicant
file = open(applicant.resume.url).read
attachments[applicant.resume] = file
email_with_name = "#{@current_tenant.name} <#{@current_tenant.help_email}>"
mail(from: email_with_name, to: applicant.job.apply_email, subject: "New Job Application")
end