Is it possible to make site_email an i18n variable? We have multilingual site pointing to 2 domain according to site language.


  www.example.com (Swedish)
  
  www.other.com (English)


Now when some user post content from Swedish domain we want to send notification of content submission to user from info@example.com and if from English domain then from info@other.com 

Is that possible ?

I have attempted like below in custom module whose weight is 1000:

function custom_overrides_init() {

  global $language;

  if($language-&gt;language == "sv"){
    variable_set('site_mail', "info@example.com");
  }else if($language-&gt;language == "en"){
    variable_set('site_mail', "info@other.com");
  }
}


When I see in maillog it shows correct from email addresse but its not working and use same email address which is set on site configuration. 

i18n_variable also does not provide site_email as variable. 

Please suggest !
Your current solution is actually a very bad practice, as you will be rebuilding the variable cache on every page request, which is a big hit.

You can set the site_mail variable as translatable by installing the Variable module (http://dgo.to/variable), then implementing hook_variable_info() and declaring the site_mail variable. 

function hook_variable()
{
  $variables['site_mail'] = array
  (
    'title' =&gt; t('Site Email'),
    'description' =&gt; t('The email addresses site mails are sent from'),
    'type' =&gt; 'string',
  );

  return $variables;
}


You then need to go to Admin -> Configuration -> Regional and Language -> Mutilingual settings -> Variables, and set site_mail as being translatable. You will then be able to visit the site information page and set a different value for the site mail in each language.