function sparkpost_from in Sparkpost email 7
Same name and namespace in other branches
- 7.2 sparkpost.module \sparkpost_from()
Returns an array containing the from information for a Sparkpost message.
Return value
array array( 'email' => 'admin@example.com', 'name' => 'My Site', )
2 calls to sparkpost_from()
- SparkpostMailSystem::mail in includes/sparkpost.mail.inc 
- Send the email message.
- sparkpost_admin_settings in ./sparkpost.admin.inc 
- Administrative settings.
1 string reference to 'sparkpost_from'
- sparkpost_uninstall in ./sparkpost.install 
- Implements hook_uninstall().
File
- ./sparkpost.module, line 92 
- Sparkpost integration.
Code
function sparkpost_from() {
  $default_from = variable_get('site_mail', ini_get('sendmail_from'));
  $email = variable_get('sparkpost_from', $default_from);
  $name = variable_get('sparkpost_from_name', variable_get('site_name'));
  return array(
    'email' => $email,
    'name' => $name,
  );
}