How to send MMS with C#

风格不统一 提交于 2019-12-01 09:58:52

问题



I need to send MMS thought a C# application. I have already found 2 interesting components: http://www.winwap.com
http://www.nowsms.com

Does anyone have experience with other third party components?
Could someone explain what kind of server I need to send those MMS? Is it a classic SMTP Server?


回答1:


Typically I have always done this using a 3rd party aggregator. The messages are compiled into SMIL, which is the description language for the MMS messages. These are then sent on to the aggregator who will then send them through the MMS gateway of the Network Operator. They are typically charged on a per message basis and the aggregators will buy the messages in a block from the operators.

If you are trying to send an MMS message without getting charged then I am not sure how to do this, or if it is possible.




回答2:


You could do it yourself. Some MMS companies just have a SOAP API that you can call. All you need to do is construct the XML and send it off via a URL. I have done this once before, but can't remember the name of the company I used.




回答3:


This post earlier discussed different approaches for SMS and might be helpful for you.




回答4:


You could use Twilio to accomplish this. You can dive into the docs for specific implementation details but using the C# helper library the code to send an MMS would look like this:

 // Send a new outgoing MMS by POSTing to the Messages resource */
    client.SendMessage(
        "YYY-YYY-YYYY", // From number, must be an SMS-enabled Twilio number
        person.Key,     // To number, if using Sandbox see note above
        // message content
        string.Format("Hey {0}, Monkey Party at 6PM. Bring Bananas!", person.Value),
        // media url of the image
        new string[] {"https://demo.twilio.com/owl.png" }
    );

Disclaimer: I work for Twilio.



来源:https://stackoverflow.com/questions/54092/how-to-send-mms-with-c-sharp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!