The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-20-2009
xmaverick xmaverick is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 10
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
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:21 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0