Hi bradcathey, after your code i change my code no error and prints ok. But not yet seems mail their. please give me any idea.
#!/usr/bin/perl5.8.0 + use MIME::Lite; + $MIME::Lite::AUTO_CONTENT_TYPE = 1; + ### Start with a simple text message: $msg = MIME::Lite->new( From =>'gubevijay@india.com', To =>'gubevijay@gmail.com', Subject =>'A message with 2 parts...', Type =>'multipart/mixed', ) or die "Error creating multipart $! \n"; + # - add the text message part $msg->attach ( Type => 'TEXT', Data => 'hai, how are u', ) or die "Error adding the text message part: $!\n"; ### Attach a part... the make the message a multipart automaticall +y: $msg->attach(Type =>'AUTO', Path =>'/root/logo.gif', Filename =>'logo.gif', Disposition =>'attachment' ) or die "Error adding logo.gif: $!\n"; + + if ($msg->send()) { print "ok"; } else { print "Error sending"; }
Update: It's working some smtp problem. Thanks bradchatchey
In reply to Re: How to send an attachment using MIME::Lite?
by gube
in thread How to send an attachment using MIME::Lite?
by gube
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |