CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Post deleted by hem_k24

 



hem_k24
Novice

Jun 27, 2013, 6:04 PM

Post #1 of 2 (317 views)
Post deleted by hem_k24

 


wickedxter
User

Jun 28, 2013, 6:10 PM

Post #2 of 2 (302 views)
Re: [hem_k24] Read data from CSV file and print the data into email body [In reply to] Can't Post

1: is the path to the file correct that your attaching?
2: $msg->send; maybe your host needs some different config...


Code
### Create a new multipart message: 
$msg = MIME::Lite->new(
From => 'me@myhost.com',
To => 'you@yourhost.com',
Cc => 'some@other.com, some@more.com',
Subject => 'A message with 2 parts...',
Type => 'multipart/mixed'
);

### Add parts (each "attach" has same arguments as "new"):
$msg->attach(
Type => 'TEXT',
Data => "Here's the GIF file you wanted"
);
$msg->attach(
Type => 'image/gif',
Path => 'aaa000123.gif',
Filename => 'logo.gif',
Disposition => 'attachment'
);
### use Net:SMTP to do the sending
$msg->send('smtp','some.host', Debug=>1 );



http://search.cpan.org/~rjbs/MIME-Lite-3.029/lib/MIME/Lite.pm#Sending

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives