I'll have to let other people tell/show you how to send a file attachment, although I would take a look at Mail::Sender. It looks pretty easy to use. I've never had to mess with that.#!/usr/local/bin/perl -w use strict; use Net::SMTP; { my $sender = 0; $sender = Net::SMTP->new ('smtp.mailserver.pm'); $sender->mail ('perlmonk@themonastery.org'); $sender->to ('goddesses@themonastery.org'); $sender->data (); $sender->datasend ("From: perlmonk\@themonastery.org\n"); $sender->datasend ("To: goddesses\@themonastery.org\n"); $sender->datasend ("Subject: Promotions\n"); $sender->datasend ("\n"); $sender->datasend ("Please vote my articles up, I need the XP"\n\n") +; $sender->dataend; $sender->quit; }
Originally posted as a Categorized Answer.
In reply to Re: How do I send an email with Perl (including an attachment)?
by jcwren
in thread How do I send an email with Perl (including an attachment)?
by Paav
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |