How can we mark a message as answered using the GMail API? - gmail-api

We have an iOS app connected to an AppAngine backend and we have implemented basic emailing functionality using the GMail API (from the backend) however reply to still has a small problem: we noticed that the reply arrow is not shown in desktop email client (eg. Apple Mail app in my tests) when we reply from our app. (We have set the required headers (In-Reply-To and References) and the threadId, as described in the API docs, and the email was sent succesfuly)
Then we figured it out after reading (https://www.rfc-editor.org/rfc/rfc3501#section-2.3) and experimenting with IMAP using a local script:
for marking the message as replied we had to set the \Answered flag; then the small arrow icon will be shown in email clients.
Is there any way to set the \Answered flag using the GMail API?

Related

Strange message from facebook messenger api

For some reason I receive message from facebook page (with connected bot):
"Thanks for messaging us. We try to be as responsive as possible. We'll get back to you soon."
But in bot app there is no such phrase.
Whether he can send a facebook message under some conditions (such as long response from webhook)?
I'm guesssing it's an old auto response setting for that page.
Go into settings and under Response Assistant, set both of these to No:
Stay responsive when you can't get to your computer or phone
Send Instant Replies to anyone who messages your Page

Mail GAE not sending but

I have a problem sending mail with JavaMail Service in GAE.
I did all the code in the documentation, i debug it online and it work fine, and it count the mail sended in the quota section the problem is, i didn't receive anything, and also checked with the account sender and it's the same there isn't any trace of mail sended. I tried this for some mails address and it's not working too.
Anyone had this problem yet? A solution to this?
The problem is that the mail sended as SPAM on gmail account.
Read doc: https://cloud.google.com/appengine/docs/java/mail/#Java_Authenticating_mail_DKIM
The email used to send the mails must be a member of the application. It can be the problem... It was with me.
https://cloud.google.com/appengine/docs/python/mail/
The link is about python but for sure that the same email rules apply to Java.
For security purposes, the sender address of a message must be one of the >following:
The Gmail or Google Apps Account of the user who is currently signed in
Any email address of the form anything#appname.appspotmail.com or >anything#appalias.appspotmail.com
Any email address listed in Email API Authorized Senders found in the App >Engine Settings page of the Developers Console

No way to search Yahoo Mail programmatically with Java?

I have been working on a Java app that connects to Yahoo mail to enable a user to search through their Yahoo email.
Recently, Yahoo suddenly (with only 5 weeks notice) discontinued Yahoo Mail API, which we were using and worked great. Then we re-engineered and switched to YQL. Unfortunately, for unknown reasons, this too has stopped working as of this week. The endpoint keeps returning an error. Even when YQL did work, it was occasional and sporadic. Even the Yahoo YQL console is returning errors. We have tried using JavaMAIL IMAP access to search for messages. We can connect to the IMAP server, but the JavaMAIL Search terms are not supported. I keep getting the error "SEARCH Server error - Please try again later". The same code works just fine for other IMAP services (like Aol mail).
So basically, with Yahoo Mail API gone, YQL not working, and IMAP not supporting searching, there is no programmatic way of searching Yahoo mail right now? Yahoo keeps telling us that the Yahoo API for IMAP access is the way ahead (see here https://developer.yahoo.com/mail/). But this is not live yet and there is no functioning documentation. Sending an email to imap-service#yahoo-inc.com was useless as no one responds to that anyway. They should learn a thing or two from Facebook on how to manage changes and maintain developer relations.
Does anyone have an alternative means to programatically search Yahoo Mail for emails with Java?
Thanks.
I managed to get IMAP access working with Yahoo through OAuth 2.0, but this code is in Python:
Follow the directions here to refresh the user's token:
https://developer.yahoo.com/oauth2/guide/index.html#refresh-token-label
(you can use the refresh_token that you received using OAuth 1.0)
Replace the email_address and access_token in the following code:
import logging
import imaplib
import datetime
import quopri
import hashlib
endpoint = 'imap.mail.yahoo.com'
email_address = 'REPLACE_THIS#yahoo.com'
access_token = 'REPLACE_THIS'
auth_string = 'user=%s\1auth=Bearer %s\1\1' % (email_address, access_token)
imap_conn = imaplib.IMAP4_SSL(endpoint) # the IMAP server we're connecting to
imap_conn.debug = 3 # for logging purposes
imap_conn.authenticate('XOAUTH2', lambda x: auth_string)
folders = imap_conn.list()
print folders
imap_conn.select('Inbox', readonly=True)
result, data = imap_conn.uid('search', None, '(FROM "Amazon.com")')
messages = data[0].split()
print 'messages:' + str(messages)
uids_to_fetch = ','.join(messages)
result, data = imap_conn.uid('fetch', uids_to_fetch, 'RFC822')
for counter, message in enumerate(data[::2]):# every other item in the list is not a message, but ")" so we skip it
# yield raw mail body, after decoding the quoted-printable encoding
print quopri.decodestring(message[1])

Google Calendars set to Auto-Accept any invitation are rejecting all invitations created by http request

I have two google calendars that I am trying to add events to programmatically through HTTP requests. I happen to be using iOS HTTP library, but I imaging that's largely irrelevant.
Both http requests are coming back as successes, but one calendar is declining the invitation.
It appears to me that they are both set up the same way, although I don't have admin access to them.
Is this more likely a calendar configuration problem that I can't see or is this an HTTP request problem?
Does anyone know the proper configuration settings for the calendars?
Edit: I asked for and received admin access to a pair of calendars, one that works one that does not. Both calendars have the "See all event details" preference selected

About google app gmail api

I was trying to send emails to my client from my application after few sent mails all mails bounces back with a message saying "You have reached a limit for sending mail. Your message was not sent." And one more thing when i see my developer console gmail api it still showing 0% usage.what is this issue? is this a bug or something else?
There's an extra limit on sending because it's a vector for abuse--it doesn't show up in the developers console but it's the same as sending via SMTP or the web interface.
This seems to have a good overview:
http://www.labnol.org/internet/email/gmail-daily-limit-sending-bulk-email/2191/

Resources