Distinct offers Network Monitor, the ONLY natural language Protocol Analyzer, ONC RPC for C++, .NET and Java, and IntelliTerm, the fastest Terminal Emulator for TN3270, TN5250 and VT420 on the market.

Distict - Support - FAQ

Products Downloads Sales Support About us
Knowledge Base Ask Cody Resources



        
 
How do I use this from Java
Here is a code sample for this:


import com.ms.activeX.*;
import com.ms.com.*;

public class Class1
{

public static void main (String[] args)
{
//creating arguments for EasySend
Variant[] margs=new Variant[9];
margs[0]=new Variant("smtp_server"); //substitute your smtp server here
margs[1]=new Variant("john@server.com"); //from address
margs[2]=new Variant("jack@anotherserver.com"); //to address
margs[3]=new Variant(""); //cc field
margs[4]=new Variant(""); //bcc fields
margs[5]=new Variant("test from java"); //message subject
margs[6]=new Variant("message body"); //message body
margs[7]=new Variant(""); //attachment path (empty string means no attachments)
margs[8]=new Variant("c:\\temp"); //temporary folder

//creating SMTP object
ActiveXComponent m=new ActiveXComponent("DCVSMTP.DCVSMTPCtrl.1");
//invoking EasySend method
m.invoke("EasySend",margs);

}
}





  02/04/2012   Legal notices | PRIVACY Policy |