google app engine not able to connect to outlook mailbox - google-app-engine

I are trying to read emails from an outlook mailbox using javamail api. The protocol for this mail reading is imap. Google SDK comes with java mail API but it doesn’t support imap protocol. For the purpose I need to include java mail api libraries in pom.xml. Now there are two copies of javamail api in app engine project, one that comes with google sdk and the other one from pom.xml. During execution of java code to connect to mailserver, app engine is not able make a connection sometimes. The behavior is not consistent as GAE might be loading java mail api in random order. When GAE doesn't connect to mailbox, i see the following error:
javax.mail.MessagingException: No login methods supported!
(com.sun.mail.iap.ProtocolException: No login methods supported!)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:477)
at javax.mail.Service.connect(Service.java:248)
at javax.mail.Service.connect(Service.java:91)
at com.disney.util.MailBoxConnector.connect(MailBoxConnector.java:48)
I could not find a workaround for this problem. Any suggestion will be greatly appreciated.

Related

Why javax.mail packages in google app engine sdk?

I can find javax.mail packages in google app engine sdk. Can anyone tell me the purpose of including such packages in google app engine where we already have a dedicated jar ( java mail) for these packages in market.
Control of the environment. When the JavaMail API is provided it allows GAE to control what mail server and javamail providers are used for sending and receiving.
From the Overview of Sockets API for Java:
Sockets are only available for paid apps, and traffic from sockets is billed as outgoing bandwidth.
[snip]
Port 25 (SMTP) is blocked;
The GAE javax.mail API provides email to free GAE accounts where as if you had to include a jar you would have to get a paid GAE account to send or receive email.

Can't send email using email function in Google Cloud Platform

We have G Suite account with our domain name. And our server is Google Cloud Platform. We are using PHP for our development, we trying different code for sending mails, but cant receive any mails using mail functions, and we contact G Suite account they said all the settings are working perfectly... This issue is regarding Google Cloud Platform, cloud reject the mails.
Is any additional settings needed to implement on Google Cloud Platform to establish a connection with G suite account?
Should we have an App Engine account for sending email via code?
Any ideas on what might be happening here or what to test next?
Disclosure: I am a product manager on Google Cloud Platform (though not the products discussed here specifically).
Note that outgoing connections on port 25 (SMTP) are disabled, so you cannot use that for sending email programmatically. This is probably the issue that you're running into.
Here are some alternatives, depending on what server product you are using:
Google App Engine (GAE): use the Mail API
Google Compute Engine (GCE) or Google Container Engine (GKE):
send email via G Suite domain, or
work with one of our email partners, such as SendGrid, Mailgun, or Mailjet

Google PubSub: SSL error when subscribing using an AppEngine push endpoint

I created a topic which I subscribe to using a push endpoint. The endpoint is a simple AppEngine web service. The Google PubSub documentation states that endpoints must be secured by HTTPS.
I am not receiving any traffic to the push endpoint. The AppEngine web service shows no requests. I've verified through the Google PubSub dashboard that messages are being published on the topic successfully. The dashboard shows unreachable_ssl_error for push subscriptions. Why is Google PubSub reporting this error?
When I try to access the SSL AppEngine endpoint via a browser I receive an SSL cert error also. Is this normal for AppEngine sites?
As documented at https://cloud.google.com/appengine/kb/general#https , SSL is supported on App Engine, but in a somewhat peculiar way.
Specifically, and I quote...:
Note: After April 2013 Google does not issue SSL certificates for
double-wildcard domains hosted at appspot.com (i.e. *.*.appspot.com).
If you rely on such URLs for HTTPS access to your application, change
any application logic to use "-dot-" instead of ".". For example, to
access version v1 of application myapp use
https://v1-dot-myapp.appspot.com.
Also look at the previous paragraph at this same URL about the need for secure in app.yaml and a link to language-specific instructions on exactly how to configure things, e.g https://cloud.google.com/appengine/docs/python/config/appconfig#Python_app_yaml_Secure_URLs if you're programming in Python.

Gtalk Service On Google App Engine Using Python

I searched a lot for built web service like Google Talk, using Google Application Engine and Python.
For that first step is to check the status of online user on the Gmail. I found many code of it on python using XMPP library but it work only on python not using Google Application Engine.
There is also suggestion of using XMPP python API but for sending message we have to provide JID like app-id#appspot.com and message send.We can not send message from one email Id to another Email Id directly.
Now I want to perform Oauth authentication in python for gtalk at domain level can anyone tell me how to do this?
I think you are confused. Python runs ON appengine. Also theres a working java xmpp example provided.
You can only send messages from your app. There are two options: your_app_id#appspot.com or anything#your_app_id.appspotchat.com.
If you wanted to behave like an arbitrary xmpp client, you'll have to use a third party xmpp library running over HTTP and handle the authentication with the user's XMPP server.

Online and Chat in AppEngine Application

I have an AppEngine application which uses Google Accounts as authentication. What is the approach or idea on seeing if someone is online or using the application? And able to chat to online users.
Thanks.
The official way to implement chat on App Engine is using the Channel API. However, the quotas are strange, and it's fairly expensive at $0.01/100 connections.
I would recommend using a hosted web socket service like Pusher, or running your own nodejs server on another host.
You can use the XMPP API to get users status, and send them messages that appear in Google Chat.
https://developers.google.com/appengine/docs/python/xmpp/

Resources