Hi

I get a

Notice: Undefined index: key in SWIFTMailSystem->mail() (line 223 of /srv/www/htdocs/sites/all/modules/swiftmailer/includes/classes/SWIFTMailSystem.inc).

error when i use swiftmailer together with views send.

The error seems to be caused by $message['key'] not being present. Adding an additional isset test around the code block supresses the error notice (like:

if (isset($message['key'])) {
      $files = module_invoke_all('swiftmailer_attach', $message['key']);
      if (!empty($files) && is_array($files)) {
        $message['params']['files'] = array_merge(array_values($message['params']['files']), array_values($files));
      }
}
CommentFileSizeAuthor
#3 2666416-undefined-index.patch1.07 KBsbrattla
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wvd_vegt created an issue. See original summary.

wvd_vegt’s picture

Issue summary: View changes
sbrattla’s picture

Adding patch for this issue.

bhavikshah9’s picture

Status: Active » Needs review