- 论坛徽章:
- 0
|
下面的代码发送html格式邮件,图片一直无法显示。
可以正常收到邮件用outlook打卡,英文显示正常,图片是红叉叉,哪位朋友告诉我什么情况?- #!/usr/bin/perl
- use Mail::Sender;
- eval{
- (new Mail::Sender) ->OpenMultipart({
- smtp => 'Mailgw2.ic.com.cn',
- #smtp =>'stgsmtprelay.paic.com.cn',
- from => 'monitor@xbox.ic.com.cn',
- to =>'hsdf@citrix.com.cn',
- subject => 'GTM Monitor',
- multipart => 'related',})
- ->Part({ctype => 'multipart/alternative'})
- ->Part({ ctype => 'text/plain', disposition => 'NONE', msg => <<'*END*' })
- *END*
- ->Part({ctype => 'text/html', disposition => 'NONE', msg => <<'*END*'})
- <html>
- <body><h1><p align="center">This's a picture for F5-GTM VS</h1></p>
- [color=Yellow]<img src="cid:a.gif">[/color]
- <p align="center">This vs aways up/down,must check it now;</p>
- </body>
- </html>
- *END*
- ->EndPart("multipart/alternative")
- ->Close();
- }
- or print "Error sending mail: $Mail::Sender::Error\n";
- ~
复制代码 |
|