Create electronic newsletters and email to all people in an excel spreadsheet

  • Thread starter DB Coordinator for CS
  • Start date
D

DB Coordinator for CS

Hi Guys

We are using Windows platform and active perl in our organisation. We want
to create electronic newsletters(which embed images as well) and want to
mailout all the people whose email addresses are in an excel spreadsheet.
Can you give some advice about what modules/items we should use in Active
perl to create/mailout electronic newsletters?. How can we achieve this
task?. Are there any particular way to do this in active perl?. What
modules/sections of Active perl we should need?.Can you give some reference
or help?

Thank you
Jo
 
G

Gregory Toomey

DB Coordinator for CS said:
Hi Guys

We are using Windows platform and active perl in our organisation. We want
to create electronic newsletters(which embed images as well) and want to
mailout all the people whose email addresses are in an excel spreadsheet.
Can you give some advice about what modules/items we should use in Active
perl to create/mailout electronic newsletters?. How can we achieve this
task?. Are there any particular way to do this in active perl?. What
modules/sections of Active perl we should need?.Can you give some reference
or help?

Thank you
Jo

Heres a couple of simple examples of sending email as HTML using MIME::Lite.
You could put your newsletter in HTML format.
Also see http://search.cpan.org/dist/MIME-Lite/lib/MIME/Lite.pm
The easiest way to get the email addresses from Excel is cut/paste into
notepad.


#!/usr/bin/perl
use strict;

require MIME::Lite;
require MIME::Lite::HTML;


my $msg;
$msg = MIME::Lite->new(
To =>'(e-mail address removed)',
From =>'(e-mail address removed)',
Subject =>'HTML with in-line images!',
Type =>'multipart/related'
);
$msg->attach(Type => 'text/html',
Data => qq{ <body>
Here's <i>my</i> image:
<img src="http://asdasd.com.au/images/asdasd.gif">
</body> }
);
$msg->send;



my $mailHTML = new MIME::Lite::HTML
From => '(e-mail address removed)',
To => '(e-mail address removed)',
Subject => 'test';

my $MIMEmail = $mailHTML->parse('http://asdsad.com.au');
$MIMEmail->send;


gtoomey
 
D

DB Coordinator for CS

Gregory Toomey said:
Heres a couple of simple examples of sending email as HTML using MIME::Lite.
You could put your newsletter in HTML format.
Also see http://search.cpan.org/dist/MIME-Lite/lib/MIME/Lite.pm
The easiest way to get the email addresses from Excel is cut/paste into
notepad.


#!/usr/bin/perl
use strict;

require MIME::Lite;
require MIME::Lite::HTML;


my $msg;
$msg = MIME::Lite->new(
To =>'(e-mail address removed)',
From =>'(e-mail address removed)',
Subject =>'HTML with in-line images!',
Type =>'multipart/related'
);
$msg->attach(Type => 'text/html',
Data => qq{ <body>
Here's <i>my</i> image:
<img src="http://asdasd.com.au/images/asdasd.gif">
</body> }
);
$msg->send;



my $mailHTML = new MIME::Lite::HTML
From => '(e-mail address removed)',
To => '(e-mail address removed)',
Subject => 'test';

my $MIMEmail = $mailHTML->parse('http://asdsad.com.au');
$MIMEmail->send;


gtoomey
 
D

DB Coordinator for CS

Thanks Greg. This really helped me. I couldn't install the MIME::Lite::HTML
module. I use ppm for module installation. I was able to install only
MIME::Lite.

Cheers
Jo
 
G

Gregory Toomey

DB Coordinator for CS said:
Thanks Greg. This really helped me. I couldn't install the MIME::Lite::HTML
module. I use ppm for module installation. I was able to install only
MIME::Lite.

Cheers
Jo

When I did this last your I installed the two modules in a local directory.
My ISP at the time did not have them installed.

gtoomey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top