Solstice::Email - Send email with a resonable amount of ease.
use Solstice::Email; my $mailer = Solstice::Email->new(); $mailer->from('From Address <sender@example.com>'); $mailer->to(@email_addresses); $mailer->cc(@email_addresses); $mailer->bcc(@email_addresses); $mailer->subject('Subject!'); $mailer->plainTextBody('Plain text version'); $mailer->htmlBody('<b>HTML version!</b>'); # This will make it so an image can be embedded in the HTML. # To reference the image in the HTML, use the something like the # following: # <img src="cid:happy_user.png" /> $mailer->attachMedia( content_type => 'image/png', id => 'happy_user.png', path => '/path/to/happy_user.png', ); $mailer->send(); # For internal use, and perhaps some testing... my $server = $mailer->getSMTPServer(); my $from = $mailer->getFrom(); my @to = $mailer->getTo(); my @cc = $mailer->getCC(); my @bcc = $mailer->getBCC(); my $subject = $mailer->getSubject(); my $text = $mailer->getPlainTextBody(); my $html = $mailer->getHTMLBody(); my @media = $mailer->getAttachedMedia();
This module was designed to make it easy to send HTML email, in a way that older mail clients would be able to read. It is designed to supercede the old Email module, which seems like it was written at a point when people still needed convincing that object encapsulation was a good idea.
No symbols exported.
Constructs a new Solstice::Email.
Returns the smtp server we will be using.
Set the sender.
Returns the sender.
Set an array of recipients.
Returns an array of address.
Returns an array of addresses.
Subject of the email.
Returns the subject of the email.
A version of the email for older clients.
Returns the plain text version of the message.
A version of the email for shiny new clients.
Returns the HTML version of the message.
Add an image to the email.
Returns an array of all media attached to this message.
Places the mail in the mail queue
Sends off the email.
Solstice::Configure, MIME::Lite, Net::SMTP.
Catalyst Group, <catalyst@u.washington.edu>
$Revision: 3364 $
Copyright 1998-2007 Office of Learning Technologies, University of Washington
Licensed under the Educational Community License, Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.opensource.org/licenses/ecl1.php
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
To install Solstice, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Solstice
CPAN shell
perl -MCPAN -e shell install Solstice
For more information on module installation, please visit the detailed CPAN module installation guide.