템플릿에서 전자 메일을 만들고 전자 메일에 .csv 파일을 첨부하려고합니다. 전자 메일은 첨부 파일을 통해서만 제공되며 내용은 무시됩니다. 내가 여기서 뭘 잘못하고 있는거야?내 이메일에 Rails 2.2에 내용이없고 첨부 파일 만있는 이유는 무엇입니까?
def send_email(csv_file, results)
@subject = "subject here"
@from = "hl7_data mailer<[email protected]>"
@recipients = HL7_DATA_EMAIL_ADDRESS
@results = results
attachment :content_type => "text/csv", :body => csv_file
end
mailer_view/send_email.html.erb:
Here is my content for the hl7 data email file: <%[email protected]%>
내 파일 내용이 올바르게 표시되지만 파일을 첨부했는데 표시가 중단 되었습니까?
왜 그런가? 다음 첨부 파일을 허용해야
@content_type = "multipart/mixed"
이 : 첨부 파일을 보내려면
이 기본 콘텐츠 _ 때를 첨부 파일을 추가하십시오. – Kamilski81