View Single Post
  #3 (permalink)  
Old November 16th, 2006, 08:49 AM
crmpicco crmpicco is offline
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

Code:
#! /usr/bin/perl

# Craig R Morton

use MIME::Lite;

############ EMAIL ###############
# build email message
$msg = MIME::Lite->new(
            From => "noreply\@picco.net (Boab)",
            To => "craig\@picco.net",
            Subject => "Report (with CSV Attachment)",
            Type    => "multipart/mixed"
            );

$msg->attach(Type => "TEXT", Data => "Attached to this document is a CSV report of all confirmed bookings made within the last week by Picco\n\nThere have been $counter bookings made within the last week");
$msg->attach(Type => "text/plain", Path => "/web/picco/data/crmpicco.csv", Filename => "crmpicco.csv");

$text = $msg->as_string;

# send email message
$msg->send;
############ EMAIL ###############

www.crmpicco.co.uk
www.ie7.com
Reply With Quote