How to set field permission programmatically in Drupal?

I have a main GMail address, and several other GMail addresses that I have set in the main one (so I can write emails "as if" I were on the other address). But when I write a message as my other address, the "sender" field in the msg is my main addr?

  • Say I have two addresses: and . The main one is "aaa" so I go to settings and enable it to send emails "as if I were bbb" (confirmation in "bbb" received and accepted, etc). So I am using "" and I create a new message, and choose "" as the "from" field. I send this message, and inside the headers the "reply to" is OK because it has "" in it, but the "sender" field is bad because it has "aaa@gmail" in it. How can I avoid this, and have every field in the headers to have "bbb@gmail" in them? Thank you.

  • Answer:

    You can't. It will always show that it was sent in-behalf of the other account. If you have your own domain which you link to Google Apps and have your own SMTP-relay (I think) you are able to set it up! But why do you want to do it?

Andrew Rump at Quora Visit the source

Was this solution helpful to you?

Other answers

I have many GMail accounts, but let's say I have only two: the one with "my nickname @http://gmail.com" and the one with "my name @http://gmail.com". The main one is the one with the nickname, and by "main" I mean the one I use sith Android Play Store, the one I use to log in many services, the one with my photos, etc... And of course, the one that receives all the mail from the other account, via automatic forwarding. Now, let's say I've grown up, have a job and a child, and would like to send an email from "my name @http://gmail.com" to my son's school, or to a job interviewer. The problem is that the damn "my nickname @http://gmail.com" direction would pop up eventually. It's just a matter of "look and feel"... :-(

Iñigo Hervías

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.