.






PerlScript ASP Example



Here's actual working code using PerlScript in an Active Server Page application to send mail via VIM/MAPI/VINES/MHS:

@ LANGUAGE = PerlScript 

$idsMail = $Server->CreateObject("IDSMailInterface.Server");
$idsMail->{'ObjectKey'} = 'ABC123';
$idsMail->NewMessage ()';
$idsMail->AddRecipientTo ('Jim Smith');
$idsMail->AddRecipientCc ('Mary Brown, Doug Williams');
$idsMail->{'Subject'} = 'Meeting Agenda';
$idsMail->{'Message'} = 'Here is the agenda for the weekly meeting.';
$idsMail->AddAttachment ('C:\MEETINGS\AGENDA.DOC');
$idsMail->Send ();


Note that we didn't need to specify the type of E-mail system we wished to use. IDSMail automatically determined the type of E-mail present on the workstation, and sent the message accordingly.

Here is a similar example for SMTP (Internet mail)

@ LANGUAGE = PerlScript 

$idsMail = $Server->CreateObject("IDSMailInterface.Server");
$idsMail->{'ObjectKey'} = 'ABC123';
$idsMail->{'SMTPServer'} = 'mail.acme.com';
$idsMail->{'MailSystem'} = IDSM_SYS_SMTP_POP;
$idsMail->NewMessage ()';
$idsMail->{'From'} = 'me@mycompany.com';
$idsMail->AddRecipientTo ('jim@acme.com');
$idsMail->AddRecipientCc ('mary@state.edu, doug@ibm.com');
$idsMail->{'Subject'} = 'Meeting Agenda';
$idsMail->{'Message'} = 'Here is the agenda for the weekly meeting.';
$idsMail->AddAttachment ('C:\MEETINGS\AGENDA.DOC');
$idsMail->Send ();


If you wish, download our Programming Guide (140k)



© 1993-2010, AssurX, Inc. All Rights Reserved. Trademarks. 408-778-1376 | email: info@intuitive-data.com