When trying to compose and send a multipart/mixed email with attachments I get the below errors for every attachment. This works fine without the module, webform_mail_headers theme function incldued below
Notice: Uninitialized string offset: -1 in SmtpMailSystem->_get_substring() (line 589 of /home/content/37/8862037/html/sites/all/modules/smtp/smtp.mail.inc).
Notice: Uninitialized string offset: -1 in SmtpMailSystem->_get_substring() (line 589 of /home/content/37/8862037/html/sites/all/modules/smtp/smtp.mail.inc).
The data could not be saved, because the destination is invalid. More information is available in the system log.
function theme_webform_mail_headers_14($variables) {
$headers = array(
'X-Mailer' => 'Drupal Webform (PHP/' . phpversion() . ')',
);
$hash = md5('randomstring');
$headers['Content-Type'] = "multipart/mixed; boundary=\"".$hash."\"; charset=UTF-8";
return $headers;
}
Comments
Comment #1
wundo commented