How to fetch POP3/SMTP email using Cordova - objective-c

I'm new to mobile development and have been looking for a way to retrieve basic email information from simple POP3/SMTP email servers.
I've seen many posts on how to send email using numerous Cordova plugins, etc., but I'm simply trying to retrieve email information for various listing and analysis purposes.
Is this even possible?
Thanks for the help and suggestions on where to start.

Cordova does not have built-in functionality for POP3/SMTP access. As inside your codova app you are running in the javascript/webview sandbox, you don't have socket access, so you can't implement this kind of functionality there.
This leaves you no choice but to implement a Cordova Plugin. You are in Objective-C land now, but unfortunately there aren't any convenient classes in the standard framework for accessing POP3/SMTP. Your best bet is using a library like MailCore.
Details on how to implement a Cordova Plugin (as well as passing the relevant email data from and to your javascript layer) are outside the scope of a simple StackOverflow answer, but the process is (fortunately) well documented.

Related

Are there any registration/authentication api's which can be used in React Native

I'm developing an IoS and Android app using react-native, and am now starting to consider all the aspects of user registration, so that typically the person will provide some credentials, and then get sent an email (or possibly sms) enabling them to "verify" their account, after which point they are a registered user.
These registration processes (and subsequent emails/sms's seem to be fairly common , so I'm wondering if there are any API's which anyone has come across which make the job of creating the registration/activation process easier m rather than writing code from scratch ?
Many thanks in anticipation
It depends what you want when you ask for an API. If you're developing backend as well you can use Auth0.
If you want just to implement frontend, I guess you have to write your own code. Consider using something like redux or mobx to store your email and other things after logging in.
Anyways the REST part you have to write on your own. As for views you can google for it, for example there's react-native-login-screen

How to integrate wit.ai With my own chatbot application

I would like to create my own web chatbot and i like to integrate my app with wit.ai for natural language classification.I need to know how to integrate wit.ai service(through api call) with my application(any language in backend).i am using C# in front end.I have gone through the integration part Which posted in wit.ai website.But i don't know how to connect it .Could anyone send me a integration details little briefly
I think the short answer is its similar to how you would call any other APIs from your application server components. Wit exposes multiple APIs like message, speech and converse which you can call by passing the Authorization token and other payloads and make use of the API response in your application.
You can use message API if you are only interested in extracting
intent and other atributes of the sententense
Use speech for building voice based application and
Converse if you want to build a little more smarter app. Currently you can only pass text for converse APIs.Hoping they will introduce voice option for this soon.
Now to make things simpler, they have also provided SDKs in various languages like node-wit, pywit etc. So if you want to build your server side logic using on nodejs or python you can use these SDKs. The advantage is that you dont have to manage raw APIs calls and instead it is all managed by SDK. Also, other big advantage is that you can make use of runActions method which encapsulates converse API and make things simpler. If you want to build in nodejs then the messenger example is a good starting point. You can borrow all this logic/concept in your app and replace FB related calls etc with your custom bot. For Python you can look at the below link
https://github.com/wit-ai/pywit/pull/55
Also, you can explore the options like using other frameworks like botkit if you plan to integrate wit with other chatbots like FB messenger or slackbot as these frameworks provide more flexibility and ability to easily switch to different chatbots in future. But they don't seem to properly support the converse API of wit.
You are specifically looking for integration details. Since you are using c# for frontend app, natuarally the best option would be to use c# for backend as well. In which case you will be left with directly calling wit APIs from your backend as I think there are no SDKs in c#. If you want to make use of SDK in node or python etc then you will have to build a rest based backend (for example) which can be invoked from your c# application. I am currently working on a nodejs app and integrating it with wit using node-wit. I can share some code once its ready but i dont know when I will be able to finish it. For bootstrapping my application I have used this node application. If you have some understanding of node then you can look at the /server/controllers logic. Similar to this application I have built a witController which uses runAction to interact with wit and I am calling this from front-end when user submits a message to your bot. The biggest challenge in runAction is to figure-out a way to send back the wit response to your front-end and get follow up response from user. Wit sends the response in Send method as you can see in the node-wit's messanger example.
Hope this helps!

How to store postman collections in source control

I am using POSTMAN collections to test my API before opening it up. I work with a team of developers and we would like to share/add/edit our collections amongst each other.
Doing this in source control is proving slightly tricky as can be seen in this comment on the GitHUB page:
This issue still persists in Version 2.1.1 (packaged)
The order of requests might be deterministic now, but the diff of an exported collection from two different machines and users includes data that are not related to the collections exported. The diff is full of owner and other id conflicts if there are several people working on the tests at the same time.
What is the best way that we have of putting this data in some sort of version control system? Any suggestions otherwise?
Putting it in a VCS undoubtly will give you some headaches as you mentioned. Your best bet is to use Postmans functionality to share collections. Here is from the documentation found at https://www.getpostman.com/docs/sharing
Starting with Postman v0.9.3 you have the ability to share and manage your collections more effectively. The first thing you will have to do is create a Postman account. You can create one using your email ID or a Google account. Once you are signed in after creating an account, the collections you upload on Postman are linked to your account. You can delete them later through the "Shared collections" item in the navigation bar dropdown.
Collection v2 format removes most, if not all, problems with portability.
http://blog.getpostman.com/2015/06/05/travelogue-of-postman-collection-format-v2/
The format must be highly portable so that it can be easily transported between various systems without loosing functionality.
Source Control in Postman
The question about sharing collections so that you can collaborate with your teammates has been answered a few different ways, as described in other answers of this question such as by sharing the collection or by syncing to a team account.
Version Control in Postman
The other part of the question was about putting the Postman data into a version control system. Postman introduced some version control features for the paid team accounts, like being able to restore collections to a certain point in the activity feed.
The paid team accounts also get integrations to sync their collections to their own version control systems like GitHub for example. If you're on a free account, you can use the Postman API to build your own similar integration to update the collections.
This blog post talks about some of the version control features in Postman.
UPDATE: Postman released forking and merging in Postman app v6.7.1 so you can manage version control in the app.
To automatically share your existing postman collection you can use Postman Pro.
It is a paid service provided using which a team lead can purchase the complete pro- scheme for his team and work as an admin.
Postman pro enables the following and many more:
Any changes in the API are automatically reflected in Postman for all member
Members subscribe to the collections from the Team library and get notifications of any changes.
For more information you can refer:
https://app.getpostman.com/dashboard/team-upgrades
This is what I use with my team of automation testers.

Can we send email through gmail or yahoo clients in iPhone sdk

I want to send email through gmail or other message clients,is it possible in iOS.
I searched a lot but didn't find anything.
I don't want to use the default composer to send mail.I wants user to choose whether they want to send emails from the default mfmailcomposeviewcontroll or can send through gmail,yahoo.
There are a few ways in which 3rd-party developers may offer this functionality -- regardless of the manner selected, it is up to the 3rd-party vendor to decide how much (if any) of these methods are implemented and documented in the public domain as accessible to other applications or users. Ultimately you will need to consult the target product's documentation or support channels to determine if such mechanisms exist. While this is neither an exhaustive list, nor it is a list of formally supported mechanisms for achieving your goal, it should give you some insight into what to go research or ask additional questions about:
Option 1: Open URL Schemes
iOS Developers can register their applications to respond to a URL scheme like "tel://" or "sms://" or "http://". If vendors register a URL scheme it will be visible in the app's info.plist. While it won't speak to the format of any parameters you need to pass, the vendor's documentation or support personnel may be able to shine a light on those capabilities. For the HTTP scheme, iOS' MobileSafari.app is registered to respond -- the well-formed NSURL that gets passed to Safari is used as the URL to which Safari navigates when launched.
Option 2: 3rd-party SDK
Other vendors may elect to make an SDK available that you can implement in your app. Google Drive, Dropbox, and Facebook are all great examples. To incorporate these cloud filesystems or social capabilities in your own apps, you can register as a developer and follow install guides to both adopt their SDK and leverage the functionality the SDK provides.
As for your specific question, it appears as though Google's official Gmail app does have an undocumented URL Scheme that the community has discovered, reverse-engineered, and written up. While I VERY STRONGLY DISCOURAGE use of undocumented app capabilities there is nothing preventing you from using this functionality. Keep in mind that because this is undocumented, there is a distinct possibility that the feature could be removed, changed, or otherwise made unavailable in future builds that can leave your own app in a bit of a bind. Furthermore, for those of your users that do not have the Gmail app installed would not be able to leverage this URL Scheme and could lead to a poor user experience. All that said, with the caveats above, Tom Scotland has written up a series of blog posts on the Gmail app's URL scheme and updates to the scheme as a function of the rest of the Google constellation of iOS apps - http://tom.scogland.com/blog/2013/01/29/gmail-url-scheme/
Yahoo Mail is a separate issue -- As far as I can tell, this app offers neither of these access options, however I'll leave the digging as an exercise for the OP.
Again, I encourage you to use MFMailComposerViewController instead of unofficial or unapproved app capabilities so as to limit your own app's exposure to changes beyond your control.

Set instant messenger display message programmatically

Would a script that sets display messages for instant messengers be simple or complex? After some searching, there doesn't seem to be any information about this at all.
For the sake of an example, if I had a text file of quotations, would it be possible to have the google talk display message change to a different quotation hourly?
Depends on which client you're using. As far as I know, Google's client doesn't offer any interface for plugins, but the open source instant messenger Pidgin does. I think there already is a plugin for what you want to do, but you can write your own using the documentation and examples they give you.
The complexity of writing something like this is based on how much C or Perl you know, since you can program in either of those for Pidgin. Reading code from other people's plugins, you should be able to figure out the Pidgin API.
You can use Kik API to programmatically send rich content and files between mobile applications. It is available for iPhone and Android platforms and takes only about 5 lines of code to integrate into your app. There is more info at the API website: http://www.kik.com/dev
Disclaimer: I'm on of the developers behind Kik API :)