This example Perl program shows how NetMailBot can be invoked from within Perl using Perl's Process command.
Using this feature requires knowledge of the Perl programming language and a working installation of Perl on your computer.
Prepared Example Files
The archive contains one file:
Perl File Contents
This is the content of the Perl file:
my ($processobj, $exitcode);
my $executable = 'NetMailBot.exe';
my $server = 'mail.domain.com';
my $from = 'email@example.com';
my $to = 'firstname.lastname@example.org';
my $subject = 'Test: Perl process Command';
my $body = "Test: Perl process Command";
my $Args = '-server ' . $server .
' -from ' . $from .
' -to ' . $to .
' -subject ' . '"' . $subject . '"' .
' -body ' . '"' . $body . '"';
Win32::Process::Create( $processobj, $executable, $args, 0, CREATE_NEW_CONSOLE, "." );
print "Process started with PID ", $processobj->GetProcessID(), "\n";
print "Process completed with exit code ", $processobj->GetExitCode( $exitcode ), "\n";
print "Unable to start process: ", Win32::FormatMessage( Win32::GetLastError() ), "\n";