ActionMailer를 사용하여 첨부 파일이있는 전자 메일 메시지를 보내는 데 문제가 있습니다.전자 메일의 파일 이름이 유효하지 않습니다. (ActionMailer)
Gmail에서 내 메일을 읽을 때 파일 이름이 'noname'입니다.
알리미 기능
class Notifier < ActionMailer::Base
def send_message
attachments["text.txt"] = {:content => "hello"}
mail(:to => "[email protected]", :subject => 'test')
end
end
메시지 헤더 :
Date: Sun, 19 Dec 2010 23:18:00 +0100 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; filename=text.txt Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=text.txt Content-ID: ...
어떻게 바로 파일 이름으로 메시지를 보낼 수 있습니까?
감사합니다.
실제로보기를 'send_message.text.erb'라는 이름으로 지정하면 더 명확 해집니다. –
동일한 작업을 수행하는 두 개의 개별 파일이있는 이유는 무엇입니까? – Trip