|
#1
|
|||
|
|||
|
Hello Friends,
I want to send attachments through a SMTP server. Iam already sending mails through it (using Net::SMTP utility). But, till now Iam only able to send only messages and not with attachments. Can anybody tell me how to send attachments while sending mails on other's mail id. As, Iam novice to Perl, It will be greatly helpful for me if anyone can provide me a code for sending the attachment. So, I could be able to send both message and attachment together. It will be better, if someone can guide me for that or using Net::SMTP utility. Thanks in advance...... Pawan Sangal |
|
#2
|
|||
|
|||
|
Through a guide i have found a tutorial in which this synopsis was given that
use Mail::Sender; $sender = new Mail::Sender {smtp => 'mail.yourdomain.com', from => 'your@address.com'}; $sender->MailFile({to => 'some@address.com', subject => 'Here is the file', msg => "I'm sending you the list you wanted.", file => 'filename.txt'}); |
|
#3
|
|||
|
|||
|
For attachments, you need to create a multipart MIME message.
You can use the Net::SMTP::Multipart module in perl to do the job for you. Here is the documentation on Net::SMTP::Multipart: http://search.cpan.org/~DROBERTS/Net...t/Multipart.pm |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|