Displaying 1 result from an estimated 1 matches for "forward_email".
2011 May 24
0
Rails 3.0.7 ActionMailer attachments
...and the Attachment model stores the name of
the attachment and belongs to an Email. In the view there''s a simple
form that allows an email address to forward the email to. That''s all
working fine. It''s just the attachment part that I''m having troubles
with.
def forward_email(email_id, from_address, to_address)
@email = Email.find(email_id)
@recipients = to_address
@from = from_address
@subject = @email.subject
@sent_on = Time.now
@body = @email.body + "\n\n"
@email.attachments.each do |file|
if File.exist?(file.full_path)...