Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8776311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:01:29+00:00 2026-06-13T19:01:29+00:00

I am using Email Audi API to download user’s mailbox in encrypted form..When i

  • 0

I am using Email Audi API to download user’s mailbox in encrypted form..When i write code into google script and tried to run then it gives error 504 : Timeout error.. When i did this using OAuth playground then i succeed to download mailbox..So please give me some suggestion to resolve this problem.

Code :
function downloadMailBox(user){
var user='user@mydomain.com'
var base='https://apps-apis.google.com/a/feeds/compliance/audit/'
var fetchArgs=googleOAuth_('google',base)
var userID=user.split('@')[0]
//Logger.log(userID)
var rawXml='<atom:entry xmlns:atom="http://www.w3.org/2005/Atom" xmlns:apps="http://schemas.google.com/apps/2006">'+
    '<apps:property name="packageContent" value="FULL_MESSAGE"/></atom:entry>'
    fetchArgs.payload=rawXml
var uriForMailbox=base+'mail/export/mydomain.com/'+userID
UrlFetchApp.fetch(uriForMailbox,fetchArgs)
}


function googleOAuth_(name,scope) {
  var oAuthConfig = UrlFetchApp.addOAuthService(name);
  oAuthConfig.setRequestTokenUrl("https://www.google.com/accounts/OAuthGetRequestToken?scope="+scope);
  oAuthConfig.setAuthorizationUrl("https://www.google.com/accounts/OAuthAuthorizeToken");
  oAuthConfig.setAccessTokenUrl("https://www.google.com/accounts/OAuthGetAccessToken");
  oAuthConfig.setConsumerKey("mydomain.com");
  oAuthConfig.setConsumerSecret(consumersecret);
  return {oAuthServiceName:name, 
  oAuthUseToken:"always",
  contentType:'application/atom+xml',
  method:'POST'
  }; 

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T19:01:30+00:00Added an answer on June 13, 2026 at 7:01 pm

    I found one solution for this…I just wrote above code into try-catch block..As timeout error comes, it goes to catch block where i am calling above function downloadmailBox() again.(sometimes script executes properly and sometimes gives error).It will call this function again and again till get success. probably it gets success within 2 or 3 attempts…So by doing this way, timeout problem can be resolve.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have successfully sent an email using the Google App Engine. However the only
Is there a best practice for using email/user accounts for 3rd part APIs in
i am trying to make a custom login form in drupal-6.22 using Email Registration
I have a script that sends SMS alerts using email to SMS gateways like
I am currently using a email form, which posts some text once the email
I cannot login using email in CakePHP 2.1, when i try with username then
I have implemented a very basic sign up using email address+name, although I would
I would like to ask your guidance on how to authenticate using email add/
When sending email using the SMTPClient class in ASP.NET C#, how can I add
Can I send email using jQuery only? I don't have .Net or PHP etc

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.