Set Content-Type in MMS from Java

Set Content-Type in MMS from Java SearchSearch
Author Message
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8138
Registered: 10-2002
Posted on Tuesday, March 29, 2016 - 08:00 pm:   

From our support mailbox:



I need to send an MMS with png files as attachments.

I am using the java code from here:

However the attachment filenames are WITHOUT extension (.png) so it does not work using

addparameter(“MMSFile”,file) since that expects the correct extension.

Is there any way to set the content-type for an attachment?


No, there is not.

Even if you modify the Java code to pass content-type as a parameter instead of relying on guessContentTypeFromName, for this interface, NowSMS would ignore it, and still expects to determine content-type based on the file extension.


Bryce Norwood
Now SMS/MMS Support

Add Your Message Here, or click here to start a new topic.
Bold text Italics Underline Create a hyperlink Insert a clipart image
Options: Automatically activate URLs in message