Sponsored Content
Top Forums Shell Programming and Scripting ambigouity on using Mime::Lite? Post 302274530 by DILEEP410 on Wednesday 7th of January 2009 09:23:50 PM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
asadmin-create-mime(1AS)					   User Commands					  asadmin-create-mime(1AS)

NAME
create-mime - adds the MIME type SYNOPSIS
create-mime --user admin_user[--password admin_password][--host localhost] [--port 4848][--passwordfile filename][--secure|-s][--instance instance_name] --mimefile filename mime_ID Adds the MIME type associated with the named server instance. The server determines the MIME type of a requested resource by invoking the type-by-extension directive in the ObjectType section of the obj.conf file. The type-by-extension function does not work if no MIME element has been defined in the server element. OPTIONS
--user administrative user associated for the instance. --password administrative password corresponding to the administrative user. --host host name of the machine hosting the administrative instance. --port administrative port number associated with the administrative host. --passwordfile file containing passwords appropriate for the command (e.g., administrative instance). --secure if true, uses SSL/TLS to communicate with the administrative instance. --instance name of the instance. --mimefile name of a MIME types file. OPERANDS
mime_id internal name for the MIME types listing. It is used in a virtual-server element to define the MIME types used by the virtual server. Example 1: Using create-mime asadmin> create-mime --user admin --password adminadmin --host fuyako --port 7070 --instance server1 --mimefile mime.types sampleMIME Created Mime with id = sampleMIME Where: sampleMIME is the name of the MIME created. EXIT STATUS
0 command executed successfully 1 error in executing the command INTERFACE EQUIVALENT
HTTP Server node, MIME Type Files page asadmin-delete-mime(1AS), asadmin-list-mimes(1AS) J2EE 1.4 SDK March 2004 asadmin-create-mime(1AS)
All times are GMT -4. The time now is 07:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy