def mail_template
return "From: <%=encode_field(from) %>\nTo: <%=encode_field(to) %>\nDate: <%=date.rfc2822 %>\nMIME-Version: 1.0\nX-Mailer: Yapra <%=Yapra::VERSION::STRING %>\nSubject: <%=encode_field(subject) %>\nContent-Type: multipart/mixed; boundary=\"<%=boundary -%>\"\n\nThis is a multi-part message in MIME format.\n\n--<%=boundary %>\nContent-type: text/html; charset=UTF-8\nContent-transfer-encoding: base64\n\n<%=content %>\n\n--<%=boundary %>\n<% attachments.each do |file| -%>\nContent-Type: <%=file.header['Content-Type'] %>;\n name=\"<%=encode_field(file.filename) %>\"\nContent-Disposition: attachment;\n filename=\"<%=encode_field(file.filename) %>\"\nContent-Transfer-Encoding: base64\n\n<%=[file.body].pack('m') -%>\n\n--<%=boundary %>\n\n<% end -%>\n"
end