function hook_mandrill_valid_attachment_types_alter in Mandrill 8
Same name and namespace in other branches
- 7.2 mandrill.api.php \hook_mandrill_valid_attachment_types_alter()
- 7 mandrill.api.php \hook_mandrill_valid_attachment_types_alter()
Allows other modules to alter the allowed attachment file types.
@array $types An array of file types indexed numerically.
1 invocation of hook_mandrill_valid_attachment_types_alter()
- MandrillMail::isValidContentType in src/
Plugin/ Mail/ MandrillMail.php - Helper to determine if an attachment is valid.
File
- ./
mandrill.api.php, line 16 - This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.
Code
function hook_mandrill_valid_attachment_types_alter(&$types) {
// Example, allow word docs:
$types[] = 'application/msword';
// Allow openoffice docs:
$types[] = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
}