Guest
16 years ago
I am struggling to complete the code for sending an MMS in VB2008 (Got an SMS coded just fine).

Here is my Code
** At start of Class
Imports System.Collections
Imports System.Collections.Specialized


** Function to Send text Messages
' Dimension Local Variables
Dim objIntelliSMS As New IntelliSoftware.IntelliSMS
Dim NewMMSMessage As New IntelliSoftware.MMSMessage
Dim sResult As String

' Set Parameters
objIntelliSMS.Username = "XYZ"
objIntelliSMS.Password = "123"
objIntelliSMS.PrimaryGateway = "http://www.intellisoftware.co.uk"
objIntelliSMS.BackupGateway = "https://www.intellisoftware2.co.uk"
objIntelliSMS.RequestDeliveryRpt = True

NewMMSMessage.Subject = "MMS Message Subject"
Dim MessagePart1 As New IntelliSoftware.MessagePart
MessagePart1.Filename = "Image1.gif"
MessagePart1.SourceFilename = "C:\Image1.gif"
NewMMSMessage.MessageParts.Add(MessagePart1)
Dim MessagePart2 As New IntelliSoftware.MessagePart
MessagePart2.Filename = "Text1.txt"
MessagePart2.Text = "This is a text part"
NewMMSMessage.MessageParts.Add(MessagePart2)

' Send Message - To be Completed


Dim ToList As New StringCollection()
ToList.Add("44771012345")
ToList.Add("44771054321")

sResult = objIntelliSMS.SendMMSMessage(ToList, NewMMSMessage)


This final line fails as I think I need a string collection to return the results but not sure how to convert from your C# example

Cheers

Gus
Support
16 years ago
SendMMSMessage return a SendStatusCollection

Here is an example on how to use it:

SendStatusCollection SendStatusList;

SendStatusList = objIntelliSMS.SendMMSMessage(ToList, NewMMSMessage)

string Report = "";
foreach ( SendStatus sendStatus in SendStatusList )
{
    Report += "To:" + sendStatus.To + ", " +
              "MessageId:" + sendStatus.MessageId + ", " +
              "ResultCode:" + sendStatus.ResultCode + "\n";
}

MessageBox.Show ( Report );

Please click link below for more information:
http://www.intellisoftware.co.uk/sms-gateway/dotnet-component/sendstatuscollection/ 
Guest
16 years ago
Sorry to be a pain but I was looking for the code in VB not C# as you have no examples in VB

Cheers

Gus
Guest
14 years ago
Gus, Can you send/post how you got SMS to work in vb.net. I can only get it working in C# which is a paid because my entire solution is Visual Basic.net

Thks