ActiveXperts
SMS & MMS Toolkit


 Product Overview

 Supported Protocols:
 
 How to use

 Online Samples

 Download (.exe)

 Brochure (.pdf)

 Manual (.htm)

 Release Notes


Support

 Knowledge Base

 Forum

 Contact Support


Purchase

 Licensing

 Pricing

 Order now


Providers

 SMPP Providers

 MMS Providers

 TAP/UCP Providers

 SNPP Providers


Related documents

 Case studies

 SMS Documents

 GSM Network Codes

 TAPI Documents

 About Mobile
 Communications


 AT Commands

 RFC's


  Download ActiveXperts SMS and MMS Toolkit 5.1  (6826 KB - .exe file)
  Download Manual  (623 KB - .htm file)


Using SMS and MMS Toolkit with Visual CSharp .NET


The SMS and MMS Toolkit is a software development kit (SDK) to enhance an application or script with SMS, MMS and Pager functionality.
An SMS messages can be sent using a GSM/GPRS modem, an SMPP provider, an HTTP compliant SMS provider or using a standard dialup or fixed-line SMS modem.
An MMS messages can be sent via a GSM/GPRS modem (MM1), an SMTP server (MM4) or an XML/SOAP compliant provider (MM7).

SMS features:
  • Send and receive numeric- and alphanumeric text SMS messages
  • Verify delivery of outgoing SMS messages
  • Support for multimedia SMS messages, including ringtones, pictures and logo's
  • Support for WAP Push, WAP Bookmarks, vCards, voicemail/e-mail/fax/MMS indications
  • Support for Unicode, to support foreign languages like Chinese, Turkisch, etc.
  • Support for multi-part messages, to allow messages longer than 160 characters
  • Support for GSM modems, GSM phones, SMS/HTTP providers, SMPP (Short Message Peer to Peer) providers, TAP/XIO and UCP dial-in SMSC providers
  • Support Multi-threading environments. The component is thread-safe, which means it can be used in a multi-threaded environment
  • Samples included for various development platforms: MS Visual Basic, MS Visual Basic .NET, MS Visual C++, MS Visual Studio C# .NET, ASP, ASP .NET, Borland Delphi, Borland C++ Builder, ColdFusion and more
MMS features:
  • Support for many multimedia formats incl.: JPG, GIF, PNG, BMP, WBMP, TIF, WAV, MP3, MIDI, AC3, GP3, AVI, MPG, MP4, VCARD, VCALENDAR, JAR and more
  • Support for MM1 (MMS over WAP), MM4 (MMS over SMTP) and MM7 (MMS over HTML/SOAP)
Pager features:
  • Send alpha-numeric Pager messages through SNPP

This document describes how the SMS and MMS Toolkit can be integrated into Visual Basic.NET projects.


Step 1: Download and install the SMS and MMS Toolkit

Download the the SMS and MMS Toolkit from the ActiveXperts Download Site and start the installation. The installation guides you through the installation process.



Step 2: Create a new Visual CSharp .NET Project

Launch Microsoft Visual Studio (for instance 'Microsoft Visual Studio 2005') from the Start menu. Choose 'New' from the 'File' menu and click on 'Project'. In the 'New Project' dialog, select a Visual Studio template (for instance: 'Console Application'). Select a name for the application (for instance: 'DemoApp') and a name for the solution (for instance: 'DemoSolution'). Also, select the directory where you want to store the project (for instance: 'C:\MyProjects):

    
    (Click on the picture to enlarge)



Step 3: Refer to the SMS and MMS Toolkit Library and create the objects

Now that a new project has been created, you must add a reference to the SMS and MMS Toolkit in the project to be able to use the the SMS and MMS Toolkit objects. To do so, choose 'Add Reference...' from the 'Project' menu. In the 'Add Reference' dialog that pops up, select the 'COM' tab and select the 'ActiveXperts SMS and MMS Toolkit 2.1 Type Library' as shown in the following picture:

    
    (Click on the picture to enlarge)

Click 'OK' to close the 'Add Reference' dialog.

On top of your code, type the following line to use the SMS and MMS Toolkit namespace:
   using AXmsCtrl
In your Main function, declare and create the following objects:
   public MmsProtocolMm1 objMMSProtocolMm1;
   public MmsMessage     objMmsMessage;
   public MmsSlide       objMmsSlide;
   public MmsConstants   objMmsConstants;
   
   objMmsProtocolMm1  = new MmsProtocolMm1 ();
   objMmsMessage      = new MmsMessage     ();
   objMmsSlide        = new MmsSlide       ();
   objMmsConstants    = new MmsConstants   ();


Step 4: Send MMS messages

You can now send MMS messages.

The following code shows how to send a MMS message:
public MmsProtocolMm1 objMMSConnection;
public MmsMessage     objMmsMessage;

/*****************************************************************************************************/

private void Form1_Load(object sender, System.EventArgs e)
{
   objMMSConnection = new MmsProtocolMm1Class();
   objMmsMessage    = new MmsMessageClass ();
	
   for ( int n = 0 ; n < objMMSConnection.GetDeviceCount () ; n++ )
   {
      ComboDevice.Items.Add (objMMSConnection.GetDevice(n));
      ComboDevice.SelectedIndex = 0;
   }

   TextLogfile.Text = System.IO.Path.GetTempPath() + "MMSLog.txt";
}

/*****************************************************************************************************/

private void ButtonLoadCfg_Click(object sender, System.EventArgs e)
{
   openFileDialog1.DefaultExt = ".mm1";
   openFileDialog1.Filter = "MMS Connection Files (*.mm1)|*.mm1";

   if ( openFileDialog1.ShowDialog() == DialogResult.OK )
   {
      objMMSConnection.ProviderProviderLoadConfig(openFileDialog1.FileName);

      if ( GetResult() == 0)
      {
         TextServerAddress.Text = objMMSConnection.ProviderMMSC;
         TextServerAPN.Text = objMMSConnection.ProviderAPN;
         TextServerGateway.Text = objMMSConnection.ProviderWAPGateway;
         TextServerLogin.Text = objMMSConnection.ProviderAPNAccount;
         TextServerPassword.Text = objMMSConnection.ProviderAPNPassword;
      }
   }
}

/*****************************************************************************************************/

private void ButtonSaveCfg_Click(object sender, System.EventArgs e)
{
   saveFileDialog1.DefaultExt = ".mm1";
   saveFileDialog1.Filter = "MMS Connection Files|mm1";

   if ( saveFileDialog1.ShowDialog() == DialogResult.OK ) 
   {
      objMMSConnection.ProviderMMSC = TextServerAddress.Text;
      objMMSConnection.ProviderAPN = TextServerAPN.Text;
      objMMSConnection.ProviderWAPGateway = TextServerGateway.Text;
      objMMSConnection.ProviderAPNAccount = TextServerLogin.Text;
      objMMSConnection.ProviderAPNPassword = TextServerPassword.Text;
      objMMSConnection.ProviderSaveConfig(saveFileDialog1.FileName);

      GetResult ();
   }
}

/*****************************************************************************************************/

private long GetResult ()
{
   if (objMMSConnection.LastError == 0)
   {
      TextResult.Text = "SUCCESS";
   }
   else
   {
      TextResult.Text = "ERROR #" + objMMSConnection.LastError + 
      " (" + objMMSConnection.GetErrorDescription(objMMSConnection.LastError) + ")";
   }

   TextResponse.Text = objMMSConnection.ProviderResponse;

   return objMMSConnection.LastError;
}

/*****************************************************************************************************/

private void ButtonSend_Click(object sender, System.EventArgs e)
{
   MmsSlide objMmsSlide;

   //Set connection parameters

   objMMSConnection.Device = ComboDevice.Text;
   objMMSConnection.ProviderMMSC = TextServerAddress.Text;
   objMMSConnection.ProviderAPN = TextServerAPN.Text;
   objMMSConnection.ProviderAPNAccount = TextServerLogin.Text;
   objMMSConnection.ProviderAPNPassword = TextServerPassword.Text;
   objMMSConnection.ProviderWAPGateway = TextServerGateway.Text;
   objMMSConnection.LogFile = TextLogfile.Text;

   //Create MMS Message and add slide including text and image
   objMmsMessage.Clear();
   objMmsMessage.AddRecipient(TextRecipient.Text);
   objMmsMessage.From = TextSender.Text;
   objMmsMessage.Subject = TextSubject.Text;

   objMmsSlide = new MmsSlide ();

   object obj1 = null;

   objMmsSlide.AddText(TextBody.Text);
   objMmsSlide.AddAttachment(TextAttachment.Text, ref obj1);
	
   obj1 = objMmsSlide;

   objMmsMessage.AddSlide ( ref obj1 );

   Cursor.Current = Cursors.WaitCursor;

   //Connect to MMSC

   objMMSConnection.Connect();

   if ( GetResult() == 0)
   {
      object obj = objMmsMessage;

      objMMSConnection.Send  (ref obj );

      GetResult();

      objMMSConnection.Disconnect();
   }

   Cursor.Current = Cursors.Default;
}

/*****************************************************************************************************/

private void ButtonView_Click(object sender, System.EventArgs e)
{
   if (System.IO.File.Exists(TextLogfile.Text.ToString()))
   {
      System.Diagnostics.Process.Start(TextLogfile.Text);
   }
}

/*****************************************************************************************************/

private void LinkProviders_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
{
   System.Diagnostics.Process.Start("http://www.activexperts.com/xmstoolkit/mmsclist");
}

/*****************************************************************************************************/

private void ButtonBrowse_Click(object sender, System.EventArgs e)
{
   openFileDialog1.Filter = "All Multimedia Files|*";

   if ( openFileDialog1.ShowDialog() == DialogResult.OK )
   {
      TextAttachment.Text = openFileDialog1.FileName;
   }
}
There are many working samples included with the product. You can also find them on the ActiveXperts FTP site: ftp.activexperts-labs.com/samples/XmsToolkit.


NOTE: Demo Projects are created with Microsoft Visual Studio 2003

The MMS Toolkit project ships with a set of Microsoft Visual Studio .NET samples, including samples for Microsoft Visual Basic .NET. The projects are created with Microsoft Visual Studio 2003.
Users with a later version of Microsoft Visual Studio can open such a project. The Visual Studio Conversion Wizard will guide you through the process of converting the project to the version used.






The ActiveXperts SMS and MMS Toolkit is a SMS development component (SDK). This control can be used by any Windows development platform, including Visual Basic .NET, Visual CSharp .NET, ASP .NET (VB,CS), ASP, Visual Basic, Visual Basic for Applications (VBA), Visual Studio/Visual C++, Borland Delphi and C++ Builder, PHP, ColdFusion, HTML, VBScript and any other ActiveX/COM compliant platform. The SMS and MMS Toolkit is an ActiveXperts Software B.V. Product.

Copyright ©1999-2007 ActiveXperts Software. All rights reserved.