function activity_send_email_mail in Open Social 10.0.x
Same name and namespace in other branches
- 8.9 modules/custom/activity_send/modules/activity_send_email/activity_send_email.module \activity_send_email_mail()
- 8 modules/custom/activity_send/modules/activity_send_email/activity_send_email.module \activity_send_email_mail()
- 8.2 modules/custom/activity_send/modules/activity_send_email/activity_send_email.module \activity_send_email_mail()
- 8.3 modules/custom/activity_send/modules/activity_send_email/activity_send_email.module \activity_send_email_mail()
- 8.4 modules/custom/activity_send/modules/activity_send_email/activity_send_email.module \activity_send_email_mail()
- 8.5 modules/custom/activity_send/modules/activity_send_email/activity_send_email.module \activity_send_email_mail()
- 8.6 modules/custom/activity_send/modules/activity_send_email/activity_send_email.module \activity_send_email_mail()
- 8.7 modules/custom/activity_send/modules/activity_send_email/activity_send_email.module \activity_send_email_mail()
- 8.8 modules/custom/activity_send/modules/activity_send_email/activity_send_email.module \activity_send_email_mail()
- 10.3.x modules/custom/activity_send/modules/activity_send_email/activity_send_email.module \activity_send_email_mail()
- 10.1.x modules/custom/activity_send/modules/activity_send_email/activity_send_email.module \activity_send_email_mail()
- 10.2.x modules/custom/activity_send/modules/activity_send_email/activity_send_email.module \activity_send_email_mail()
Implements hook_mail().
File
- modules/
custom/ activity_send/ modules/ activity_send_email/ activity_send_email.module, line 282 - Contains activity_basics.module..
Code
function activity_send_email_mail($key, &$message, $params) {
$options = [
'langcode' => $message['langcode'],
];
$variables = [
'%site_name' => \Drupal::config('system.site')
->get('name'),
];
switch ($key) {
case 'activity_send_email':
// Mail subject.
$message['subject'] = t('Notification from %site_name', $variables, $options);
// Mail body.
$message['body'][] = $params['body'];
break;
}
}