xoauth | Use xoauth to connect to Gmail | Email library
kandi X-RAY | xoauth Summary
kandi X-RAY | xoauth Summary
It 's been sometime that Google and other providers have started to support XOAuth authentication for their mail services.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Connect to gmail
- Generate OAuth string
- Fill common OAuth params
- Generate a signature base string
- Formats a dictionary of parameters
- Generate an XOAuth string
- URL escape escaping
- Generates OAuth signature
- Generate HMAC - SHA1 signature
- Escape a list of strings
xoauth Key Features
xoauth Examples and Code Snippets
Community Discussions
Trending Discussions on xoauth
QUESTION
I'm troubleshooting a process that (I think) has been working for a year or more. This solution updated a newer version of the solution software, and now it appears that one of our IMAP retrieval processes is not working correctly. (Before the update, I didn't hear any complaints about it - hence it must be working, right? :) But I don't have any data or samples from 'before the update' to know exactly what kind of results it was getting then.)
This solution is coded in FileMaker, using MBS plugin for the cURL functions. This process connects to a GMail account via IMAP protocol, using cURL commands. This process runs every hour.
In general, it works well - no errors. The problem is that it appears to be returning the wrong set of emails. We use the 'SEARCHSINCE 18-Oct-2021' function to restrict the emails found.
If I log into the account in a browser, I see 6 emails received on 10/19 in the Inbox.
When I do a search in the Gmail web interface: After:2021/10/18 I get 24 emails, and these emails include new ones received on 10/19.
- An example of the IMAP problem: SEARCHSINCE 19-Oct-2021
• Actual: 11 emails... • BUT - these emails are from 10/18, not >=10/19... these results do NOT include anything from 10/19.
- An example of the IMAP problem: SEARCHSINCE 18-Oct-2021
•Actual: 38 emails...
•BUT - some of these emails are from 10/15, not >=10/18; AND these results do NOT include anything from 10/19.
(I checked sample emails from both searches, and the 'Date' and 'ReceivedOn' headers in the source have 10/15 for the Date.)
- On a whim, I set the SearchDate = 20-Oct-2021
•Result = No IDs
Here's an actual IMAP exchange:
...ANSWER
Answered 2021-Oct-21 at 00:46I finally figured it out. There was a bug in my FMP script for this process. It was not MBS, nor IMAP, nor Google (darn it).
Specifically, there were two different IMAP commands being made. The SEARCH (which is what I was showing above, where I thought the bug was), and then the RETRIEVE. The issue was that these two commands were referencing different IDs: IMAP has two IDs - default 'Id' and 'UID'. They are very similar - they are both serial numbers - but they are not the same. UID is more permanent. So my Search was returning message IDs of the 'default' variety, and the Retrieve was referencing the 'UID' value of emails.
Search (does NOT specify UID, so returns default ID):
QUESTION
This is my onPrepare() function in conf.js file.
...ANSWER
Answered 2021-Aug-03 at 12:28I believe you are missing a return keyword here
QUESTION
I'm building a prototype web site to show a client, and need to connect to Gmail to access emails. For simplicity (as this is a prototype) I am trying to connect using the email and password for a throwaway Gmail account I created. Full security will come later, when we (hopefullly) get the agreement for the full app.
I'm using Mailkit, and the code is as follows...
...ANSWER
Answered 2021-Jun-03 at 13:27Gmail has this security feature where it requires you to login first via a web browser on the machine before it will let you connect via IMAP.
You might be able to work around this by going to the gmail settings and creating a app-specific password for your app to use.
Also, MailKits FAQ has a section about what settings to change in order to allow “less secure apps” to authenticate. Not sure if you did those steps yet.
Can you also file a feature request for MailKit to add support for Gmail’s [WEBALERT …] response code? From a quick glance, I think that may be something MailKit could parse and emit an event for (not that it would help your app that much in this case, but maybe useful to have anyway?)
QUESTION
I am trying to send mails for forgot password .The code works fine on local machine and i can recieve emails. But when i deploy on ubuntu server version 20.04 I get Error.
...ANSWER
Answered 2021-Mar-20 at 18:03You have the error described here: 2021-03-20 12:32:36 SMTP ERROR: Password command failed: 534-5.7.14
Possible the password is really incorect or you can go here: https://www.google.com/settings/security/lesssecureapps to allow less secure applications to access your account. You need to switch the button to ON.
QUESTION
I am using Horde and googles OAuth2 to login to the users IMAP, when using the below parameters for the Horde_Imap_Client_Socket
class.
ANSWER
Answered 2021-Feb-23 at 05:56This ended up being an issue with having the scopes on the actual authorization url, rather than just in the API Client settings on Google Cloud Console.
QUESTION
After almost a decade of sending email through our G Suite account/address, the script stopped working last night after a hosting company server upgrade. (Unfortunately the hosting company has currently filed this under "Not Our Problem", so there's really no help from that side. I'm hoping to at least rule out anything we're doing wrong, and to be able to go back to them with some useful forensics.)
Here's the relevant Perl excerpt:
...ANSWER
Answered 2020-Nov-13 at 23:26Given that the debug output shows no attempt for authentication it is likely that the required Authen::SASL module is not installed or not properly installed. From the documentation of Net::SMTP:
auth ( USERNAME, PASSWORD )
auth ( SASL )
Attempt SASL authentication. Requires Authen::SASL module. The first form constructs a new Authen::SASL object using the given username and password; the second form uses the given Authen::SASL object.
To determine the issue it might be useful to not simply die() with a custom error but also log $smtp->message
. Based on this code it will then maybe log the error "Need MIME::Base64 and Authen::SASL todo auth".
QUESTION
I'm using flask_mail to connect to send emails through gmail. However, the console is printing out the entire html of the render template and other sends/reply.
How do I suppress this? Can't find any documentation in https://pythonhosted.org/Flask-Mail/
...ANSWER
Answered 2020-May-19 at 22:53It's actually in the documentation.
Set MAIL_DEBUG = False
QUESTION
I am migrating to Xero and want to set an invoicing process to run once a month at a specific time using a cron job, I can get the cron job to fire and I have set up a php page based on https://github.com/XeroAPI/xero-php-oauth2-app which I can run manually and it works perfectly.
I've also used https://github.com/XeroAPI/xoauth to retrieve the tokens and store them in the keychain, I can see that they are there.
I've got a bit lost where xoauth says "Piping the access_token, id_token and refresh_token to stdout, so you can use them in a script workflow"
I'm hoping someone has done something similar and can point me in the right direction or even better give me an example as I can't find one online.
I assume I am missing a link between the 2 examples which transfers the token values.
When the cron runs I get the following error
'Fatal error: Uncaught BadMethodCallException: Required parameter not passed: "refresh_token" in /Applications/MAMP/htdocs/vendor/league/oauth2-client/src/Tool/RequiredParameterTrait.php:35'
which is not really a surprise as I'm not giving it a refresh_token as far as I can see.
I am using localhost on a Mac as a development environment.
I have seen a number of questions related to this from more experienced developers but no answers.
Thanks Gordon
...ANSWER
Answered 2020-Apr-16 at 18:32thanks for your question. We have gotten this one a lot so I used this as the base for a XeroAPI community-corner
video that I will share back here soon that walks through getting access/refresh tokens from xoauth, making api calls, and refreshing to get a new token set.
What you want to do is after you generate the access token with the xoauth repo. In your PHP script - plug in the access_token & xero-tenant-id (as 2 headers in your api call).
QUESTION
I'm trying to use Mailkit to get emails from my Gmail:
...ANSWER
Answered 2020-Mar-20 at 05:28Part of the problem is that you are using the wrong scope. You need to use GoogleService.Scope.MailGoogleCom.
The scope you are using is not for IMAP or POP3 access, it only works for Google’s web request API.
The following code works for me:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install xoauth
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page