function system_service_mailprepare in Services 6
Same name and namespace in other branches
- 6.2 services/system_service/system_service.inc \system_service_mailprepare()
- 7 services/system_service/system_service.inc \system_service_mailprepare()
Send an email using the Services module.
1 string reference to 'system_service_mailprepare'
- system_service_service in services/
system_service/ system_service.module - Implementation of hook_service().
File
- services/
system_service/ system_service.inc, line 34 - @author Services Dev Team
Code
function system_service_mailprepare($mailkey, $to, $subject, $body, $from = NULL, $headers = array()) {
$params = array();
$params['subject'] = $subject;
$params['body'] = $body;
$params['headers'] = $headers;
$status = drupal_mail('system_service', $mailkey, $to, user_preferred_language($to), $params, $from, TRUE);
if (!$status) {
return services_error(t('There was a problem sending your email.'));
}
return $status;
}