Redian新闻
>
how to automatically send email with attachments in Perl?
avatar
how to automatically send email with attachments in Perl?# Unix - 噫吁兮,危乎高哉
s*n
1
大家好,
最近在写一个程序,可以自动生成信件,然后发给客户。在UNIX下我用PERL调用sendmail,
可以发送文本信息,但却不知如何发送附件。在网上搜了一通,很多人
问过这个问题,有人说至少有两种途径:1)use Net::SMTP module 2) use UNIX
sendmail directly. 很多人讲第二种很可行,但没有提供源码。

somebody posted the following to do the job, but after I test it, it didn't
work well, some unreadable text was APPENDED to the email, not attached.
Who can help me?
#!/usr/bin/perl
# Set Variables
$mailprog = "/usr/lib/sendmail";
$youremail = "r*****[email protected]"; # Your Email Address
$yourname = "Rickyao"; # Your
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。