LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1099|回复: 4

MUTT 发送邮件乱码问题

[复制链接]
发表于 2006-1-10 00:37:10 | 显示全部楼层 |阅读模式
我使用 gb2312 的编码,发送到 Gmail 里面邮件主题和内容显示正常,但是就是附件的文件名不能正常的显示,请问大家这个是什么问题。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2006-1-10 00:59:39 | 显示全部楼层
我的 Muttrc 如下:

set folder = ~/Mail

auto_view application/zip
auto_view application/x-gzip
auto_view application/x-gunzip
auto_view application/pgp-signature
auto_view application/pgp
auto_view application/octet-stream
auto_view application/x-zip-compressed
auto_view application/x-arj-compressed
auto_view application/x-tar-gz
auto_view application/ms-tnef
auto_view application/x-perl
auto_view application/x-sh
auto_view application/x-tcl
auto_view application/x-delphi-source
auto_view application/emacs-lisp
auto_view application/msword
auto_view text/x-patch
auto_view text/html
auto_view text/x-vcard
auto_view text/x-script.elisp
auto_view image/tiff
auto_view text/x-lisp

my_hdr From: "AMD-K6"<amdk6@yeah.net>
my_hdr Reply-To: "AMD-K6"<amdk6@yeah.net>

set sendmail = "/usr/bin/esmtp -v -X ~/.esmtplog"
set envelope_from = yes
#set charset = "gb2312"
#set locale = "zh_CN"
set charset = "gb2312"
set locale = "zh_CN"
set header = no
#set hostname = yeah.net
set quit = yes
set move = no
set ascii_chars = yes
set include = yes
set indent_str = " > "
set sort = reverse-date
set fast_reply = yes

set pager_stop = yes
set resolve = yes

source ~/.mutt.alias
set alias_file=~/.mutt.alias
set record="~/Mail/sent-mail-`date +%Y-%m`"
set send_charset="us-ascii:iso-8859-1:gb2312:utf-8"
set wait_key = yes
set edit_headers = no
set pager_index_lines = 4
set index_format = "%Z %2C |%{%b%d日} %-15.15L (%5lk) %s"

color normal white default
color attachment black magenta
color signature brightred default
color status white blue
color tilde blue default
color tree brightmagenta default
color underline yellow default
color bold green default
color error red default
color indicator black white
color markers brightred default
color message white blue

color body cyan default "ftp://[^ ]*"
color body cyan default "www.[^ ]*"
color body brightgreen default "[[:alnum:]][-+.#_[:alnum:]]*@[-+.[:alnum:]]*[[:alnum:]]"
color body cyan default "<URL:[^ ]*>"
color body brightblue default "(^|[[:space:]])\\*[^[:space:]]+\\*([[:space:]]|$)"
color body brightblue default "(^|[[:space:]])_[^[:space:]]+_([[:space:]]|$)"
color body brightblue default "(^|[[:space:]])/[^[:space:]]+/([[:space:]]|$)"
color body yellow default "[;:]-[)/(|]"
color body yellow default "[8][-\^][)|]"
color body yellow default "[;:][)/(|]"
color body brightblue default "(http|https|rsync|ftp|news|telnet|finger|gopher)://[^ ]*"
color body brightblue default "<(http|https|rsync|ftp|news|telnet|finger|gopher)://[^ ]*>"

color header yellow default "^cc: "
color header red cyan "^X-Spam-Status:"
color header green default "^date: "
color header yellow default "^from "
color header cyan default "^from: "
color header yellow default "^newsgroups: "
color header yellow default "^reply-to: "
color header cyan default "^subject: "
color header green default "^to: "
color header yellow default "^x-mailer: "
color header yellow default "^message-id:"
color header yellow default "^Organization:"
color header yellow default "^Organisation:"
color header yellow default "^User-Agent:"
color header yellow default "^message-id: .*pine"

color quoted cyan default
color quoted1 yellow default
color quoted2 red default
color quoted3 green default
color quoted4 cyan default
color quoted5 yellow default
color quoted6 red default
color quoted7 green default

color index green default ~N
color index red default ~O
color index magenta default ~F
color index blue default ~T
color index yellow default ~D

folder-hook . "ignore *; unignore from to subject date X-Mailer User-Agent"
folder-hook sent.* "ignore *; unignore from to subject date"
hdr_order X-Mailer User-Agent date from to subject
回复 支持 反对

使用道具 举报

发表于 2006-1-10 11:16:30 | 显示全部楼层
gmail用的是utf8
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-1-10 13:50:20 | 显示全部楼层
这个我是知道的,所以我用:

set charset = "utf-8"
set locale = "utf-8"

却连邮件的标题和内容也乱码了,所以只好用 gb2312 ,不知道大家的 MUTT 的设置是怎么样的。昨天晚上搞了一晚还是没有解决,虽然是一个小问题,不过心里感觉挺别扭的。
回复 支持 反对

使用道具 举报

发表于 2006-1-21 14:03:07 | 显示全部楼层
试试这个参数
set rfc2047_parameters=yes
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表