mime

Multipart/alternative subtype, when client use it?

╄→гoц情女王★ 提交于 2019-12-05 04:09:51
Why webmails (like Gmail) sends MIME messages using multipart/alternative subtype (when composing in HTML) while others send HTML as MIME with text/html parts inside (without using alternative subtype)? multipart/alternative indicates that each part is an "alternative" version of the same (or similar) content, each in a different format denoted by its "Content-Type" header. The formats are ordered by how faithful they are to the original, with the least faithful first and the most faithful last. Mail-agents like Gmail know what they are doing, and convert the text/html to text/plain and put

What .NET Mime Parsing libraries are available? [closed]

☆樱花仙子☆ 提交于 2019-12-05 02:22:02
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I have a project that utilizes the javax.mail.internet.MimeMessage and other related classes that does mime parsing for emails that we receive. This needs to be ported to .NET. What .Net 3rd party or built in library can I use to replace the Java classes that I'm using? EDIT: Anything change in the last 9 months

How to send message to multiple recipients?

泪湿孤枕 提交于 2019-12-05 02:09:43
I'm having some trouble sending a message to multiple addresses using the Gmail API. I've successfully sent a message to only one address, but get the following error when I include multiple comma-separated addresses in the 'To' field: An error occurred: https://www.googleapis.com/gmail/v1/users/me/messages/send?alt=json returned "Invalid to header"> I'm using the CreateMessage and SendMessage methods from this Gmail API guide: https://developers.google.com/gmail/api/guides/sending That guide states that the Gmail API requires messages that are RFC-2822 compliant. I again didn't have much luck

Gmail attachment and custom extension

限于喜欢 提交于 2019-12-04 23:20:44
问题 I work currently on an Android application that read file with a custom extension. One of the mandatory features, is that the app must be proposed by gmail when the user receive a mail with the attachment .ourextension. I did some research, and found that gmail client on Android doesn't rely on the extension, because in the data of the launched intent the file proposed has no extension. It only rely on the mime-type given by the mail client. The problem is that our custom file are not

Is there a way to have a Codeigniter controller return an image?

空扰寡人 提交于 2019-12-04 18:26:18
问题 I was wondering if there was a way for a controller to, instead of returning a string, or a view, return an image (be it JPG, PNG etc). For example, instead of ending with a $this->load->view('folder/special_view.php), I'd like to do something like $this->load->image('images/gorilla.png'), and have it so if my user were to go to that controller they would see an image as if they'd gone to a normal .png or jpeg. Can I set the headers so it expects a different MIME? Example code of this would

Querying embedded documents by matching dates in MongoDB

て烟熏妆下的殇ゞ 提交于 2019-12-04 18:13:55
I have a database containing emails and I want to search for a specific date using the regex operator and return all emails sent on that date. I have tried this so far but it doesn't return anything. I am new to regex and am not sure if I'm querying the date correctly. db.messages.find({'headers.Date' : $regex : '2001-07-06'}}) This example below successfully returned all the emails send from the specified email address. db.messages.find({'headers.From' : { $regex : 'reservations@merriotts.com' } }); The emails contain the following information: headers { content transfer encoding, content

邮件安全证书(S/MIME),如何申请邮件证书

白昼怎懂夜的黑 提交于 2019-12-04 17:30:27
近年来邮件诈骗数不胜数,我们要如何避免邮件诈骗。利用科学的手段,使用 S/MIME 证书来一眼辨别邮件的真伪,让假老板无处可逃 第一张 S/MIME 证书就在这里申请了,用来保护我们邮件的安全。邮件届的 HTTPS。 首先,需要注册一个 freessl.cn 的账号 然后,从 keymanager.org 下载一个客户端,这个客户端可以很好的帮我们管理证书私钥 申请S/MIME证书 输入 freessl.cn 进入网站 选择 S/MIME 邮件证书,并输入你需要申请的证书的 邮箱地址 点击申请,会跳到后台付款的页面。注意,这里需要登录 付款完成后,订单列表,点击继续离线生成 到这一步基本,就只需要验证邮箱所有权了。它会发送一封邮件到你 这里是邮件内容,点击邮件链接即可验证 验证完成之后,回到 freessl.cn 的订单列表,你会看到订单状态已经完成。我们保存到 keymanager,整个 S/MIME 证书就申请成功了 使用S/MIME证书 S/MIME 证书是用于邮件安全的,所以大多应用场景应该是在邮件发送接收这块。不过 freessl 开发了一个功能,实现了账号的 免密登录,体验不错 首先,我们需要从 keymanager 将导出为 PFX 格式,然后双击安装到系统里 之后就可以体验 freessl.cn 的免密登录功能了 S/MIME 证书的邮件客户端的使用就自己去探索吧。

Decoding RFC 2231 headers

我的梦境 提交于 2019-12-04 17:26:11
问题 Trying to address this issue, I'm trying to wrap my head around the various functions in the Python standard library aimed at supporting RFC 2231. The main aim of that RFC appears to be three-fold: allowing non-ASCII encoding in header parameters, noting the language of a given value, and allowing header parameters to span multiple lines. The email.util library provides several functions to deal with various aspects of this. As far as I can tell, they work as follows: decode_rfc2231 only

LotusScript cannot get file attachment from email

北慕城南 提交于 2019-12-04 15:39:57
I had never run into this problem, but I cannot get a handle on a file attachment on an email. I have code that can either search the document for Embedded Objects or search a field for Embedded Objects -- neither of them are returning the file. I can see the file on the email and I can see the $FILE field which contains the file attachment. Here is the code: Function FileDetachFiles(doc As NotesDocument, fieldName As String, getFromField As Integer) As Variant On Error Goto ProcessError Dim s As NotesSession Dim db As NotesDatabase Dim rtItem As NotesRichTextItem Dim fileToExtract As String

设置form表单传输的编码格式 application/x-www-form-urlencoded、multipart/form-data、text/plain

会有一股神秘感。 提交于 2019-12-04 14:32:17
-------------------------------------------------------------------------------------- 表单中enctype="multipart/form-data"的意思,是设置表单的MIME编码。( 用于文件上传 ) 默认情况, 这个编码格式是application/x-www-form-urlencoded (不能用于文件上传); 只有使用了multipart/form-data,才能完整的传递文件数据。 enctype="multipart/form-data"是上传二进制数据; form里面的input的值以2进 制的方式传过去。 form里面的input的值以2进制的方式传过去, 所以request就得不到值了。也就是说加了这段代码,用request就会传递不成功 取表单值加入数据库时,用到下面的: SmartUpload su = new SmartUpload();//新建一个SmartUpload对象 su.getRequest().getParameterValues();取数组值 su.getRequest().getParameter( );取单个参数单个值 -----------------------------------------------------------------