Change mail signature from my application using gmail api - email

I am new to Gmail api.My requirement is to change signature of the gmail account through my application.
Ex:
Now my account signature is
Ramprasad
And i want in this format
Ramprasad
I am not available from 26-12-2014 to 30-12-2014
How to get this signature through my application using gmail api
Thank in advance

Unfortunately the Gmail API currently doesn't provide a way to change your signature. There is an Email Settings API that does allow for this, but only for users within a Google Apps domain and only by the domain administrator.

Related

MailApp automated emails don't include user's email signature

So I've created a few spreadsheets that are used by myself and several co-workers to send automated emails. However, I'm noticing that none of these emails include the users' email signature.
I'm having a hard time finding any info on this, the only thread I found references the GmailApp, but on Sending email from Google Sheets it says to use MailApp and not GmailApp so for all my scripts I've been using MailApp.
Would anyone be able to point me in the right direction?
In order to automatically read a Gmail signature, you must use the Advanced Gmail Service or the Gmail API through Url Fetch Service. I think that the easier way to proceed is that you use the default OAuth scopes, usually the most permissive, then when you finish to use your script unauthorize it. You can do this automatically by adding ScriptApp.invalidateAuth(); at the end of your script. Note: I haven't used this method yet. If you decide to use it, verify that the authorization was removed.
The accepted answer from the referred Q/A uses the Advanced Gmail Service, not GmailApp. Anyway, instead of using the default OAuth scope that gives "complete" access to your script to your Gmail mailbox you might use one more specific. The options are listed here -> https://developers.google.com/gmail/api/reference/rest/v1/users.settings.sendAs/get. The more restrictive scope is https://www.googleapis.com/auth/gmail.readonly.
The complete list of the OAuth scopes for Gmail API -> https://developers.google.com/gmail/api/auth/scopes

Is there any way to access Yahoo IMAP with Oauth2 for new applications?

I'm looking for a way to allow Yahoo application to read user's emails over IMAP. It works well for old applications (that were created before Yahoo Mail API has deprecated), but trying to access IMAP for new applications gives me an error
[AUTHENTICATIONFAILED] (#AUTH007) Bad scope.
Unfortunately, I have no idea how to add a correct scope for accessing IMAP for new applications. During creation of the app, I was not given a choice to add scope with name even looking like 'mail'.
Is Yahoo API just broken or there is some tricky way to work around?
Contact imap-service#yahoo-inc.com
With your Yahoo.com email address and
Brief description of your product.
How will your product use Yahoo user's email content?
How will your product help Yahoo mail users?
What market do you serve?
What is your product's userbase?

Proper Way to Programatically Send Mail Using Google Apps

I have a domain which uses Google Apps for Business to handle email. I already have it mostly set up--MX records point to the correct location and my domain is verified.
I'm now writing a python app (with Django) that will need to serve mail from my domain. What's the correct way to do this with Google? Should I create a Google Apps "user" for the organization as a whole, and then authenticate via SMTP as that user and send mail from there?
The Gmail API says that it
is the best choice for authorized access to a user's Gmail data.
and that
Automated or programmatic message sending
is a typical use case. However, I'm not trying to access a user's data or send mail on behalf of a user, but on behalf of my domain. What's the correct way to proceed?
Any help much appreciated!
You could use SMTP or the Gmail API based on your description. In both cases, you'll need some sort of service account to send mail from. With SMTP, as you mentioned, you'll be authorizing via the instructions you linked.
If you choose to use the Gmail API route, you'll be authorizing the API usage with the account. The Gmail API has many other use cases (e.g. to access user's data) but you're only using it to send emails on behalf of a service account you control.

Single account for multiple OAuth providers (Facebook, Google, Windows Live)?

I have a web application that allows registration and authentication through Facebook, Google and Windows Live. Each OAuth request has the required scope to retrieve associated e-mail addresses from the authentication provider.
The current situation is that an account is created based on the provider and the provided identifier. This means that if a user has logged in with multiple providers the user will have multiple accounts on the web application.
I want to have the ideal situation of having a single acccount even when using multiple providers. I was thinking about using the e-mail addresses to see if an account exists for the user. If it exists, use the account based on the e-mail address.
How safe/reliable is this? Do all OAuth providers mentioned validate e-mail addresses? Better ways?
EDIT: Ran a tests and came up with this. Still looking for further advice :)
FaceBook: Cannot authenticate with unvalidated e-mail. Additional e-mail will not appear until validated.
Google: Provides `verified_email`. Additional e-mail will not appear until validated.
Windows Live: Cannot authenticate with unvalidated e-mail. Additional e-mail will not appear until validated.
Interesting question. You could try to use e-mail to check if user exists, but the problem is, user could be using different e-mail addresses for different providers.
My suggestion would be asking user (once he/she logs into your application using one of the methods) to attach other providers to to this account, so he/she can use them as well to log into your application.
It doesn't completely solve your problem (I'm not sure if solution exists), but user will have more control that way and you'll reduce the amount of accounts per user.

Using Google Apps Email in CodeIgniter

How do I use Google Apps' email services to send mail using the CodeIgniter email class? The email class seems to prefer SMTP, and I was going through the clients Google Apps account. I can't find any place within the Google Apps settings for SMTP. Does anyone know of a solution for this issue?
Right you don't find it because CodeIgniter uses the "mail" PHP function.
For some reasons only the most drunken PHP core developer knows about - this function do not support SMTP and worse even the admin can't configure SMTP usuage on Unix (it is possible to do this on windows - making the PHP design look even more crazy).
There are a few SMTP libraries out there that can handle SMTP Email, just use them
http://pear.php.net/package/Mail
http://sourceforge.net/projects/phpmailer/
http://swiftmailer.org/
or the Email classes from the Zend Framework which are uncoupled from the rest so easy to use with CodeIgniter.
Here is a blog post detailing instructions:
http://joelg.info/sending-email-with-gmail-using-the-codeignite
Extract From link:
Why send email with Gmail rather than
the server's SMTP configuration? There
are a number of advantages I see for
doing this: Ability to develop locally
and test email sending functionality
without going to lengths to setup a
local mail server. Ability to utilise
Google Apps emails to send email from
emails which are on your own domain.
Ability to have a reference of the
mail you send using this method in the
"sent" folder on your Gmail account.