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.

Knowledge Base

   Products   Downloads   Sales   Support   About us
  Knowledge Base  Ask Cody  Manuals  Source Code Library  Resources



        
 
Distinct Mail Objects : SMTP component frequently asked questions
 

Page 1 of 1  

Product: Distinct Mail ObjectsTopic: SMTP componentLast updated: 3/30/2008
 
Q.: Can I send multiple messages using the EasySend method without connecting and disconnecting after each message?
A.: Yes, you must first connect to the SMTP server using one of the Connect methods (Connect, AsyncConnect or ConnectThruSocks), then call EasySend in a loop to send as many messages as you want and finally call the Disconnect method. This sequence will make sure that the connection is established only once for all the messages.
 
Do you find this information useful ?       Yes   No   Not Sure

Product: Distinct Mail ObjectsTopic: SMTP componentLast updated: 3/10/2008
 
Q.: How do I use this from Java
A.: 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);

}
}

 
Do you find this information useful ?       Yes   No   Not Sure

Product: Distinct Mail ObjectsTopic: SMTP componentLast updated: 3/30/2008
 
Q.: My users cannot receive messages larger than X MB. Can I fragment LARGER messages?
A.: Yes, it is very easy to do. Just set the MaxMessageSize property of the SMTP Object to the desired size. This will break the messages that are longer than MaxMessageSize in many parts and the messages will be sent as partial messages. The POP3 client on the receiving side will automatically reassemble these partial messages into the original message. Note that if you are not using Distinct POP3 on the receiving end, you will need a client that supports this feature.
 
Do you find this information useful ?       Yes   No   Not Sure

Page 1 of 1  

Search by Keyword


If you did not find what you are looking for:


Products

 IP Sniffing
The Distinct Network Monitor is a protocol analyzer for Windows that includes both packet sniffing and network traffic statistical analysis tools.

 Intelliterm
The Most Complete Terminal Emulator for TN3270, TN5250 and DEC VT220 to VT420

 RPC for C and C++
The Fastest Way to Port Your Existing Unix-RPC Applications to Windows

  9/5/2008   Legal notices | PRIVACY Policy | Networking News |