UCWA: integrating advanced chat options - chat

I have created a simple chatting application using which two users can chat with each other. Currently i'm able to send only simple and plain text messages.
Next as an enhancement, i would like to send formatted text messages. Eg. Changing the font, text style, size, bold, italics, etc. Also i would like to integrate file sharing while chatting.
So i would like to know:
If ucwa Api has a provision for sending and receiving formatted text
messages?
Is there a provision to share files as well.
Since Microsoft Lync provides sending and receiving formatted text, i think UCWA should also do the same.
If there is no such provision, then could anyone suggest some ideas on this? (some 3rd party libraries paid/free doesn't matter)
I have gone through some of ucwa documentation but couldn't find anything relevant.
Any suggestion shall be of great help.
Thanks in advance.

If ucwa Api has a provision for sending and receiving formatted text messages?
The formatted messages you see in the Lync Client are really Html formatted messages which Ucwa also supports. To enable the receiving of these type of messages there are two options. The application can either include it in the request to makeMeAvailable providing supportedMessageFormats or by updating the communication via a Put request with the similar information.
At this point the application should be able to receive Html-formatted messages and send messages via sendMessage using the Content-Type text/html.
Is there a provision to share files as well?
Currently dataCollaboration, file-sharing, is not available.

Related

What is the best/easiest way to process received email message body and resend it?

I am receiving chart data in JSON format to my email address and my goal is to convert it to chart/chart img and resend it to my email address.
I have been looking for several methods:
Google App script used for gmail. I failed to find trigger on newly received message.
Email client, that supports adding actions based on scripts to new incoming message trigger. Only one I know about is MS Outlook with VBA scripts, but creating chart image with lack of libraries available in VBA is not very elegant solution.
Open source email client with possibility to alter the code and so directly process data and resend message. The more robust email client, the harder is to change the code to do relatively simple job, I believe.
I really donĀ“t know what kind of solution this simple problem needs.
Thank you in advance.
Sounds like you are interested in some kind of gateway on the server side, not client-side. Take a closer look at your server-side implementation. For example, you may start from the Mail flow rules (transport rules) in Exchange Online page.

automatic background email from iphone application to users

I am so confused. My simple requirement is: i have an application which contains confirmation form i.e. nib file. It contains some textFields like name, age, email etc. I simply want when somebody click on submit button application send background and automatic email to email defined in textField. that email contain all information like name, age etc. User need not to fil anything and it should work in background. There are so many application do the same thing. I am creating booking application.
So how can i impliment this behaviour.
Apple does not provide a way to do this - and for good reason. Sending emails from the phone automatically introduces a lot of security risks.
I am willing to bet that the apps that do this use an intermediary server to which they post the data. When the data is posted then the server handles the sending of the emails.
To do this:
Send an HTTPS POST request to your server application.
From your server application, send an email via SMTP (or APIs built on top of SMTP).
Google AppEngine provides a simple and cheap way to create such a web service, running on top of Google's cloud-computing infrastructure. The sending mail from AppEngine help document includes detailed examples of how to send mail from your server application (assuming you use the Python version of Google AppEngine).
Unfortunately, there is no official feature for this but you could download a third-party library. Refer here for a couple of suggestions.

Can I send email programmatically in iPhone app?

I need to be able to send a pre-formatted email or SMS text message programmatically from within an iphone app. Can this be done? I have looked at apple's MFMailComposeViewController class, but this "provides a standard interface that manages the editing and sending an email message" and the MFMessageComposeViewController class also has it's own "standard system interface for composing SMS text messages". These allow you to present an interface to the user where they have to fill in all the data and then explicitly press a send button.
I cannot use this boilerplate functionality.
I need to be able to send a message without presenting any interface to the user. I know this sounds evil, but actually it is for a commercial application which needs to communicate to a user group in a central office when users in the field have performed specific actions out in the field.
Has anyone found a solution to this?
After much investigation, I have found that sending emails programmatically, without user intervention, from an iphone application, cannot be implemented using any of the apple frameworks.
Set up a web service you can post to using an HTTP request. If you are posting to only one address this can work very well, although you may want to get the user to input their return mail address.
Otherwise only the standard dialog is available (this relies on using whatever account they've setup on the device).
Here are a few SMTP API's that work on OS X. They might work on iOS as well.
Pantomime
MailCore
EdMessage
Only Possible via Web Interface, you can not hide the Interface , this is as per apple Guidlines to Developer and as per documentation
Looking for a solution to such a problem, I found something interesting here: How to send mail from iphone app without showing MFMailComposeViewController?
I hope this will be useful!
This is standard not possible. If you can't use the standard dialog you need to use SMTP.
SMS is the same, use the dialog of use a webbased sms service (most of these cost some money).
I have no experience with iOS, but I have enough experience with email protocols to say I'd be very surprised if a client application could send email without accessing a server. More than likely, the email will be sent using the SMTP protocol and therefore must be sent using an SMTP server. Choosing how you connect to that server is about the only option you have. You could connect to a server-side script (such as php) to generate and send the email, or you may be able to create a socket and connect directly to port 25 on the SMTP server and still generate the email from you client application.
Check out:
RFC 5321 at https://www.rfc-editor.org/rfc/rfc5321
SMTP on Wikipedia at http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol
You could always do a low level telnet using SMTP protocol to a known mail server to send a message. I don't know if Apple will reject the app, but SMTP is damned simple.

Playing Chess via SMS Messaging

I know there are some pretty nice open-source chess engines with powerful AI, like Crafty, that also have a nifty command line interface.
I also know that I can send e-mails with my SMS-capable phone, and that I can reply to such an e-mail, and it will be sent to my phone as a SMS text message.
Is there any way I can combine the two? For example, text message a command like "Nd3" to an e-mail monitored by a computer, which sends the command to Crafty, and e-mails back the response?
I wasn't sure which site to post this one on; hopefully this is appropriate.
Instead of parsing emails back and forth, you could use one of the SMS gateways out there like Twilio that supports sending and receiving messages via HTTP POST requests. I don't know of any free ones off hand that do it this way, but using regular ol' HTTP could save you a lot of time fussing with email servers and such.
Full disclosure: I work at Twilio.

How to display ads on outbound email?

I need to be able to display ads on email forwarded through a server (preferably postfix) based on the demographic information of the recipient. Basically a message will arrive for someuser#fakedomain.com and be forwarded to realuser#theirdomain.com with a small advertisement at the bottom.
I would like to use postfix because it appears to be able to use mysql data for various tasks, which would be beneficial so that the system could be controlled by a web app that feeds the database.
I'd prefer to use OpenX for the ad server due to targetting channels (used to select ads based on demographic information), the ability to do text ads as well as email zones, and the ability to run it locally. Other ad servers that are better suited to this problem are acceptable, of course.
The core of the problem, as I see it, is being able to write something at the bottom of any given email message. Of course html messages make this even trickier, but I'd settle for having a solution that works for plain text and work up from there.
Commercial software is an option as well, but a few days of intermittent searching hasn't turned anything up.
Simply writing something to the bottom of the email message will fail miserably in a LOT of cases, particularly with HTML email encapsulated in a MIME multipart message (or anything else in a MIME multipart message) because anything after the last MIME section marker is explicitly supposed to be ignored by any MIME parser. If you want your app to work it needs to
determine if the target message is a MIME message other than TEXT/PLAIN
If it is not, append your text only ad at the end and you're done
if it is, determine if its multipart
if not, then you need to determine the content type of the whole message
If the content type is HTML then you can attempt to insert your ad HTML somewhere appropriate. This will be very hit or miss since you have no idea what the HTML layout will be like.
if the content type is anything OTHER than HTML (or maybe RTF), you're best off not touching the message.
If the message is multipart, determine the subtype
if its 'mixed', then you need to determine which part if any is the primary readable content, and then modify that portion as if it were the whole message based on the above rules
If its 'alternative' then you need to find ALL the readable portions and modify each of them in turn according to the above rules
Finally, and most importantly
Be prepared for the massive ill will you will receive from everyone who gets mail routed through your server.
Let me see... People sign up for your service, which I assume is free. They provide you their real email address and in return you provide them a different email address which they can use to e.g. subscribe to mailinglists and for other services. And maybe some spamfilter functionality? That sounds like a legit service to me, especially if you only provide the ads to the person who subscribed. I do wonder if you'd get many subscriptions, though, since many people can just as easy use a Google, Yahoo or Hotmail account for these purposes. So, what is the added value those subscribers will get?
Anyway, you would need to modify existing emails, which is a bit complex when they are HTML mails or if they're digitally signed. (Especially in the latter case, you would actually block the recipient from receiving those emails, since their email system would detect that the email has been tampered with. You might also be at risk of possible legal problems, although I don't think there's anything illegal as long as the recipient agrees with the terms of your service.