| Product: Distinct Mail Objects | Topic: SMTP component | Last 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 Objects | Topic: SMTP component | Last 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 Objects | Topic: SMTP component | Last 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 |
|