发邮件中发附件那块代码如下:
private void sendAttachmentHeader(string attachment)
{
string contentType = "application/octet-stream";//text/plain;
string header = "--" + boundary_pro + "\r\n"
+ "Content-Type:" + contentType + ";;name=" + System.IO.Path.GetFileName(attachment) + "\r\n"
+ "Content-Transfer-Encoding:base64\r\n"
+ "Content-Disposition:attachment;filename=\"" + System.IO.Path.GetFileName(attachment) + "\"\r\n";
socketSend(header + "\r\n");
}
发出去的邮件收取是如果是中文显示 ???????.txt
如何发送才能正确显示中文附件名?