Guest
2011-10-08T19:55:34Z
Hi, I am trying to send a JPEG (only 7k) via MMSSend, when i receive the message on my mobile the JPEG is corrupt only 1k?

Code below:

String _fileName = "pic.jpg";
String _file = "c:\\Pictures\\" + _fileName;

// -------------------------------------------------------------------------------
// SEND MESSAGE
IntelliSoftware.MMSMessage mmsMsg = new IntelliSoftware.MMSMessage();
mmsMsg.Subject = "Test";

IntelliSoftware.MessagePart msgPart1 = new IntelliSoftware.MessagePart();
msgPart1.Filename = _file;
msgPart1.SourceFilename = _fileName;
msgPart1.Text = "Picture";
mmsMsg.MessageParts.Add(msgPart1);

IntelliSoftware.MessagePart msgPart2 = new IntelliSoftware.MessagePart();
msgPart2.Filename = "text.txt";
msgPart2.Text = "Test Text";
mmsMsg.MessageParts.Add(msgPart2);

IntelliSoftware.IntelliSMS objIntelliSMS = new IntelliSoftware.IntelliSMS();
objIntelliSMS.Username = "abc";
objIntelliSMS.Password = "xyz";

StringCollection toList = new StringCollection();
toList.Add(12345678);

IntelliSoftware.SendStatusCollection statusCollection;
statusCollection = objIntelliSMS.SendMMSMessage(toList, mmsMsg);
// -------------------------------------------------------------------------------

Any ideas?

Thanks Andy
Guest
2011-10-09T16:30:02Z
Hi, Just to add an update to my problem.

I moved away from specifying a SourceFilename, and instead used the SourceStream property as below:

FileStream fs = new FileStream(_fileFullName, FileMode.Open);
msgPart1.SourceStream = fs;

This now uploads perfectly to your server, I can see the message in my "Sent" items mailbox and the image is correct.

Does this mean there is a bug in the SourceFilename property?

Furthermore, I am still not receiving the Image correctly onto my phone (HTC HD2) as I am getting the message
"Unable to download message from xxxxxxxxxx"

So, to conclude, I have successfully uploaded the graphic to your server correctly. I can now verify this in my "Sent" items mailbox.
I still cannot download the graphic from your server onto my phone.

Regards

Andy
Support
2011-10-10T09:40:33Z
Regarding your first issue, it looks like you have switched the parameters, please try:

msgPart1.Filename = _fileName;
msgPart1.SourceFilename = _file;

'SourceFilename' needs to contain the full path and filename. 'Filename' just the filename.

Users browsing this topic