ambigouity on using Mime::Lite?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ambigouity on using Mime::Lite?
# 1  
Old 01-07-2009
Question ambigouity on using Mime::Lite?

Hi Everyone,
I have a question related to using MIME::Lite module in perl.Below i mentioned code blocks used for sending mail through MIME::Lite.
Code:
$msg = MIME::Lite -> new (
                        From => $from,
                        To => $to,
                        Subject => $subject,
                        Type => 'multipart/related'
);

$msg -> attach(
                       Type => 'text/html',
                       Encoding => 'quoted-printable',
                       Data => qq { $message }
);

I would like to know the difference between below two send statements.Both are working and also am wondering how the first one is working.

Code:
  1. MIME::Lite -> send('smtp', $mail_host, Timeout=>60, Debug=>1);
  2. $msg -> send('smtp', $mail_host, Timeout=>60, Debug=>1);

Your help is appreciated!

With Regards
Dileep Pattayath
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem with MIME::Lite / Sendmail

Hi all, i'm using the pearl package MIME::Lite zu send eMails via sendmail. I have the problem, that in the "Received From" part oft the email header occure the user and the hostname of my machine. I'd like to have a name or an email address instead of that: Received: from... (0 Replies)
Discussion started by: andi25
0 Replies

2. Solaris

command line MIME?

Is there a commandline MIME encoder? standard on solaris 10. (a-la uuencode) (2 Replies)
Discussion started by: bigearsbilly
2 Replies

3. Shell Programming and Scripting

Sending Attachment using MIME in UNIX

Hi, I am using the below code for sending attachment in UNIX but only blank attachment is coming in email even the content is not coming. Please help!!! export CONTENT="${DIR}/${RUN_DATE}_mailbody.txt" export SUBJECT="Search Result for Pattern - ${1}" export ATTACH=${2} ( echo... (9 Replies)
Discussion started by: rajesshh
9 Replies

4. Shell Programming and Scripting

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... (2 Replies)
Discussion started by: xmaverick
2 Replies

5. Shell Programming and Scripting

Problem sending excel attachments with MIME::Lite in perl

I am running a perl script that generates an excel doc and then emails it as an attachment. I can generate the excel file fine. I can scp it from the box and open it with no problems. When I send it over email, the file does open properly. The file in email is only 288 B, but on the server it is... (1 Reply)
Discussion started by: Mike_the_Man
1 Replies

6. Shell Programming and Scripting

Retrieving File's Mime-type

Alright, so I am trying to use perl (or any other shell scripting language, awk/sed/bash for instance), to retrieve the mime-type of a file. I want to keep it in one file, and most of the modules that are on cpan that check for mime types (Magic), aren't installed on these boxes. Anyone have... (2 Replies)
Discussion started by: Rhije
2 Replies

7. Shell Programming and Scripting

how to send mail in UNIX using MIME

Hi, I am searching for an option to send mail with multiple attachments using unix. I know uuencode option, but I dont have the executable in our machines. So I am looking for some other option to do this. And I heard that we can send mails using MIME. Can anyone help me with the syntax and... (2 Replies)
Discussion started by: srilaxmi
2 Replies

8. Shell Programming and Scripting

help with mime

hey, i need some help with mime and hebrew. i have a script sending a multipart mime . the problem is that the subject is recived in jibrish. i need to know how to explictly define charset for the subject. i would appericiate any help, thanx in advance, rafi (0 Replies)
Discussion started by: rafiyaari
0 Replies

9. UNIX for Dummies Questions & Answers

mime types

Hi, I am trying to launch an ogg movie from a pdf file which has been produced with pdflatex and \movie {\centerline{\includegraphics {grafiques_xerrades/un_manolo_amb_camera.pdf}}} {hlims_xerrades/XocCumuls.ogg} The switch "externalviewer" makes kpdf launch the default... (5 Replies)
Discussion started by: pau
5 Replies

10. UNIX for Dummies Questions & Answers

Using MIME to send html files

:confused: I am a programmer, but need to work with UNIX in this particular situation. I am used to the plain "mail -s" command and also familiar with how to send attachments in html... but I now need to send an email (not an attachment) in html format so I can embed links... etc. I am told... (2 Replies)
Discussion started by: cgardiner
2 Replies
Login or Register to Ask a Question