Hi, all
I am new to the Rails. I am trying to use ActioanMailer to send an
email with a log file attached. However, after I received the email, I
found out that the format in the log file is messed up. The orginal log
file is well formated that information is written line by line.
Everything is written in one line in the log file I received from the
email.
Here's my code:
class SimpleMailer < ActionMailer::Base
def simple_message(recipient)
from 'testn@test.com'
recipients recipient
subject 'test'
body 'test'
attachment :content_type =>"text/plain",
:filename => "test.log",
:body => File.read("c:\\test.log")
end
end
Is there any way to format the log file attached?
Thanks