Win32::SqlServer::DTS::Task::SendEmail - a subclass of Win32::SqlServer::DTS::Task that represents a DTSSendMailTask object.
use warnings; use strict; use Win32::SqlServer::DTS::Application; use Test::More; use XML::Simple; my $xml = XML::Simple->new(); my $config = $xml->XMLin('test-config.xml'); my $app = Win32::SqlServer::DTS::Application->new( $config->{credential} ); my $package = $app->get_db_package( { id => '', version_id => '', name => $config->{package}, package_password => '' } ); my $iterator = $package->get_send_emails(); while ( my $send_mail = $iterator->() ) { print $send_mail->to_string, "\n"; }
Win32::SqlServer::DTS::Task::SendEmail represents a DTS SendMail task object.
Win32::SqlServer::DTS::Task::SendEmail
Nothing.
All methods from Win32::SqlServer::DTS::Task are also available.
Overrides the superclass Win32::SqlServer::DTS::Task method new to define the following attributes:
Win32::SqlServer::DTS::Task
new
cc_line
attachments
message_text
profile_password
profile
save_sent
is_nt_service
subject
to_line
Returns true or false (1 or 0) whether the caller is a Microsoft Windows NT 4.0 or Microsoft Windows 2000 Service. Returns true only if the program that calls the package Execute method is installed as a Windows NT 4.0 or Windows 2000 Service.
Returns true or false (1 or 0) whether to save outgoing e-mail messages in the Sent Items folder.
Overrides superclass Win32::SqlServer::DTS::Task method to_string to return strings for all defined attributes of the object.
to_string
Returns a string with the message text defined, including new line characters.
Returns a string with the email addresses included in the CC field of the email. Email are separated by semicolons.
Returns the complete pathname and filename of the attachments, separated by semicolons.
Returns a string with the defined profile password, if used.
Returns a string with the profile being used to send the email.
Returns a string with the subject of the email
Returns a string with all email addresses defined in the To field of the email. Addresses are separated by semicolon characters.
This class is incomplete. The methods defined for the original SendMailTask class are not defined here, except for those used as get/setter methods.
Win32::OLE at perldoc.
perldoc
MSDN on Microsoft website and MS SQL Server 2000 Books Online are a reference about using DTS' object hierarchy, but one will need to convert examples written in VBScript to Perl code.
Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>
Copyright (C) 2006 by Alceu Rodrigues de Freitas Junior
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install Win32::SqlServer::DTS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32::SqlServer::DTS
CPAN shell
perl -MCPAN -e shell install Win32::SqlServer::DTS
For more information on module installation, please visit the detailed CPAN module installation guide.