我使用以下代码通过CGI perl创建和发送电子邮件.图像得到正确附加,但css文件没有.
my $msg = new MIME::Lite( From => $from,To => $to_list,Subject => "My subject",Type => 'text/html',# 'multipart/mixed' Data => $body ); $msg->attach(Type => 'multipart/mixed',Path => $DOCS_URL . "/fonts-min.css"); $msg->attach(Type => 'multipart/mixed',Path => $DOCS_URL . "/eat.css"); $msg->attach(Type => 'multipart/mixed',Path => $DOCS_URL . "/site_styles2.css"); $msg->attach(Type => 'multipart/mixed',Path => $DOCS_URL . "/calendar_layout.css"); $msg->attach(Type => 'multipart/mixed',Path => $DOCS_URL . "/errnacc.css"); $msg->attach(Type => 'image/png',Path => $DOCS_URL . "/separator.gif"); $msg->attach(Type => 'image/png',Path => $DOCS_URL . "/trans_pixel.gif"); $msg->attach(Type => 'image/png',Path => $DOCS_URL . "/itg_side.gif"); $msg->send();
图像正确附加,但css文件根本没有附加.
知道什么’Type’应该用于附加CSS文件?
还是有其他问题吗?
解决方法
我相信text / css应该没问题
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。