![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sending an attachment through email | Sgiri1 | Shell Programming and Scripting | 1 | 04-21-2009 01:46 AM |
| Problem sending excel attachments with MIME::Lite in perl | Mike_the_Man | Shell Programming and Scripting | 1 | 01-29-2009 08:59 AM |
| ambigouity on using Mime::Lite? | DILEEP410 | Shell Programming and Scripting | 0 | 01-07-2009 10:23 PM |
| sending mail via smtp | elko.hasse | UNIX for Dummies Questions & Answers | 2 | 11-21-2007 05:41 AM |
| Sending attachment thru a mail | Rohini Vijay | UNIX for Dummies Questions & Answers | 1 | 05-12-2006 02:13 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Sending Attachment using MIME::Lite and Net::SMTP
Hello, I'm a newbie perl scriptor and i'm trying to figure out why i can't send an email using MIME::Lite with Net::SMTP. I keep receiving the following error: SMTP MAIL command failed: 5.7.1 Helo invalid . at attach1.pl line 31 The error keeps coming from the very last line of my script. It seems like a syntax error but i'm stuck. The last line is: $msg ->send(); Below is my script: #!/usr/bin/perl -w use warnings; use MIME::Lite; use Net::SMTP; use strict; my $msg = MIME::Lite->new( From => 'elliot.anico@cellularatsea.com', To => 'elliot.anico@cellularatsea.com', cc => 'wms.nmc@cellularatsea.com', Subject => 'Multiple attachments', Type => 'multipart/mixed'); $msg->attach( Type =>'image/jpg', Path =>'/export/home/omcadmin/bin/Sunset.jpg', Filename =>'Sunset.jpg'); $msg->attach( Type =>'image/jpg', Path =>'/export/home/omcadmin/bin/Winter.jpg', Filename =>'Winter.jpg'); $msg->attach( Type =>'TEXT', Data =>'This is a test for outside usage'); my $SMTP_SERVER = 'wmsexg01.corp.cellularatsea.com'; MIME::Lite->send('smtp', $SMTP_SERVER); $msg ->send(); Can anybody assist me? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|