A MailMsg (OleMailMsg for COM, CQMailMsg for Perl) object represents an e-mail message that you can send to your users.
The MailMsg object can be used to send e-mail messages from an action notification hook or used in an external application. You can use the methods of this object to specify the contents of the e-mail message including the recipients, sender, subject, and body text. You then use the Deliver method of this object to send the e-mail message.
For VBScript, you create a new OleMailMsg object using the CreateObject method as follows:
Dim mailmsg Set mailmsg = CreateObject("PAINET.MAILMSG")
For Perl, you create a new CQMailMsg object using the Build method:
$cqmail = CQMailMsg::Build(); # and delete the object when you are done with it: CQMailMsg::Unbuild($cqmail);
When you have a mail message object, you can:
use CQPerlExt; my $mailmsg = CQMailMsg::Build(); $mailmsg->AddTo("admin@us.ibm.com"); $mailmsg->SetSubject("Howdy"); $mailmsg->SetBody("This message brought to you from cqperl!\n"); $mailmsg->Deliver(); CQMailMsg::Unbuild($mailmsg);