Commit 2780a4ba authored by oadaeh's avatar oadaeh Committed by oadaeh

Issue #2947486 by oadaeh, loopduplicate: Clean up code

parent d39cf0bd
......@@ -6,12 +6,16 @@
*/
/**
* Base PHPMailer for Drupal implementation with support for SMTP keep-alive
* and setting a custom Return-Path.
* Class for implementing the PHPMailer library in Drupal.
*
* Includes support for SMTP keep-alive and setting a custom Return-Path.
*/
class DrupalPHPMailer extends PHPMailer implements MailSystemInterface {
/**
* Stores the Return-Path, which may be different from Sender.
*
* @var string
*/
public $ReturnPath = '';
......@@ -25,17 +29,19 @@ class DrupalPHPMailer extends PHPMailer implements MailSystemInterface {
* DrupalPHPMailer::SmtpSend() overrides PHPMailer::SmtpSend() to capture the
* debug output string and make it available for watchdog() calls.
*
* @var int
*
* @see PHPMailer::SMTPDebug
* @see SMTP::do_debug
* @see DrupalPHPMailer::SmtpSend()
* @see DrupalPHPMailer::drupalDebugOutput
*
* @var int
*/
public $drupalDebug = 0;
/**
* Overrides PHPMailer::SMTPDebug to capture SMTP communication errors by default.
* Overrides PHPMailer::SMTPDebug to capture SMTP communication errors.
*
* @var int
*/
public $SMTPDebug = 2;
......@@ -109,7 +115,8 @@ class DrupalPHPMailer extends PHPMailer implements MailSystemInterface {
$this->SmtpClose();
}
}
catch (phpmailerException $exception) {}
catch (phpmailerException $exception) {
}
if ($this->SMTPDebug) {
if ($this->drupalDebug && ($this->drupalDebugOutput = ob_get_contents())) {
......@@ -132,7 +139,7 @@ class DrupalPHPMailer extends PHPMailer implements MailSystemInterface {
}
/**
* (Re-)initialize properties after sending mail.
* Initialize or re-initialize properties after sending mail.
*/
public function Reset() {
$this->ClearAllRecipients();
......@@ -188,21 +195,21 @@ class DrupalPHPMailer extends PHPMailer implements MailSystemInterface {
'connect_host' => t('SMTP error: Could not connect to host.'),
'data_not_accepted' => t('SMTP error: Data not accepted.'),
'smtp_connect_failed' => t('SMTP error: Could not connect to SMTP host.'),
'smtp_error' => t('SMTP server error: '),
'smtp_error' => t('SMTP server error:') . ' ',
// Messages used during email generation.
'empty_message' => t('Message body empty'),
'encoding' => t('Unknown encoding: '),
'variable_set' => t('Cannot set or reset variable: '),
'encoding' => t('Unknown encoding:') . ' ',
'variable_set' => t('Cannot set or reset variable:') . ' ',
'file_access' => t('File error: Could not access file: '),
'file_open' => t('File error: Could not open file: '),
'file_access' => t('File error: Could not access file:') . ' ',
'file_open' => t('File error: Could not open file:') . ' ',
// Non-administrative messages.
'from_failed' => t('The following From address failed: '),
'from_failed' => t('The following From address failed:') . ' ',
'invalid_address' => t('Invalid address'),
'provide_address' => t('You must provide at least one recipient e-mail address.'),
'recipients_failed' => t('The following recipients failed: '),
'recipients_failed' => t('The following recipients failed:') . ' ',
) + $this->language;
return TRUE;
}
......@@ -214,10 +221,8 @@ class DrupalPHPMailer extends PHPMailer implements MailSystemInterface {
$tz = date('Z');
$tzs = ($tz < 0) ? '-' : '+';
$tz = abs($tz);
$tz = (int)($tz / 3600) * 100 + ($tz % 3600) / 60;
$result = sprintf("%s %s%04d", date('D, j M Y H:i:s'), $tzs, $tz);
return $result;
$tz = (int) ($tz / 3600) * 100 + ($tz % 3600) / 60;
return sprintf("%s %s%04d", date('D, j M Y H:i:s'), $tzs, $tz);
}
/**
......@@ -227,13 +232,13 @@ class DrupalPHPMailer extends PHPMailer implements MailSystemInterface {
* module, plain-text e-mails are sent, which require the same processing as
* in the DefaultMailSystem implementation.
*
* @see DefaultMailSystem::format()
*
* @param $message
* @param array $message
* A message array, as described in hook_mail_alter().
*
* @return
* @return array
* The formatted $message.
*
* @see DefaultMailSystem::format()
*/
public function format(array $message) {
// Join the body array into one string.
......@@ -248,9 +253,10 @@ class DrupalPHPMailer extends PHPMailer implements MailSystemInterface {
/**
* Sends an e-mail message composed by drupal_mail().
*
* @param $message
* @param array $message
* A message array, as described in hook_mail_alter().
* @return
*
* @return bool
* TRUE if the mail was successfully accepted, otherwise FALSE.
*
* @see PHPMailer::Send()
......@@ -297,8 +303,8 @@ class DrupalPHPMailer extends PHPMailer implements MailSystemInterface {
unset($message['headers']['Reply-To']);
}
elseif (variable_get('smtp_always_replyto', FALSE)) {
// If no Reply-To header has been explicitly set, use the From address to
// be able to respond to e-mails sent via Google Mail.
// If no Reply-To header has been explicitly set, use the From address
// to be able to respond to e-mails sent via Google Mail.
$this->AddReplyTo($from['mail'], $from['name']);
}
......@@ -338,8 +344,8 @@ class DrupalPHPMailer extends PHPMailer implements MailSystemInterface {
unset($message['headers']['MIME-Version']);
// Add remaining header lines.
// Note: Any header lines MUST already be checked by the caller for unwanted
// newline characters to avoid header injection.
// Note: Any header lines MUST already be checked by the caller for
// unwanted newline characters to avoid header injection.
// @see PHPMailer::SecureHeader()
foreach ($message['headers'] as $key => $value) {
$this->AddCustomHeader("$key:$value");
......@@ -354,9 +360,9 @@ class DrupalPHPMailer extends PHPMailer implements MailSystemInterface {
// Log the error including verbose debug information.
// Since DBLog module is the most common case, we use HTML to format the
// message for visual inspection. For sites running with Syslog or other
// logging modules, we put the actual values on separate lines (\n), so the
// surrounding HTML markup doesn't get too disturbing.
// logging modules, we put the actual values on separate lines (\n), so
// the surrounding HTML markup doesn't get too disturbing.
//
// Message is a safe t() string from DrupalPHPMailer::SetLanguage().
$output = $e->getMessage();
// Attempt to delimit summary from full message.
......@@ -364,7 +370,8 @@ class DrupalPHPMailer extends PHPMailer implements MailSystemInterface {
$arguments = array();
// Append SMTP communication output.
if ($this->drupalDebugOutput) {
// PHPMailer debug output contains HTML linebreaks. PRE is more readable.
// PHPMailer debug output contains HTML linebreaks. PRE is more
// readable.
$this->drupalDebugOutput = str_replace('<br />', '', $this->drupalDebugOutput);
$output .= '<p><strong>Server response:</strong></p>';
$output .= "<pre>\n@smtp_output\n</pre>";
......@@ -404,5 +411,5 @@ class DrupalPHPMailer extends PHPMailer implements MailSystemInterface {
return FALSE;
}
}
}
}
......@@ -8,9 +8,10 @@
/**
* Sends an already formatted e-mail message composed by drupal_mail().
*
* @param $message
* @param array $message
* A message array, as described in hook_mail_alter().
* @return
*
* @return bool
* TRUE if the mail was successfully accepted, otherwise FALSE.
*
* @see DrupalPHPMailer::mail()
......@@ -18,7 +19,7 @@
* @todo Consider to either drop this entirely, or move into phpmailer.module
* as singleton to instantiate the DrupalPHPMailer class.
*/
function phpmailer_send($message) {
function phpmailer_send(array $message) {
$mail = &drupal_static(__FUNCTION__);
if (!isset($mail)) {
......@@ -26,4 +27,3 @@ function phpmailer_send($message) {
}
return $mail->mail($message);
}
......@@ -8,10 +8,13 @@
/**
* Send out an e-mail.
*
* @param $message
* @param array $message
* Mime Mail message array.
*
* @return bool
* TRUE if the mail was successfully accepted, otherwise FALSE.
*/
function mimemail_phpmailer_send($message) {
function mimemail_phpmailer_send(array $message) {
static $mail;
if (!isset($mail)) {
......@@ -23,7 +26,7 @@ function mimemail_phpmailer_send($message) {
try {
// Extract and assign e-mail addresses required for SMTP.
// Display names are usually not required. Leave header intact.
//
// Parse 'From' e-mail address.
$from = phpmailer_parse_address($message['from']);
$from = reset($from);
......@@ -76,11 +79,12 @@ function mimemail_phpmailer_send($message) {
$message['headers']['Subject'] = mime_header_encode($message['subject']);
}
// FIXME SpamAssassin says INVALID_MSGID to PHPMailer's generated Message-ID. 06/04/2009 smk
// if (!isset($message['headers']['Message-ID'])) {
// $message['headers']['Message-ID'] = sprintf("<%s@%s>", md5(uniqid(time())), $mail->ServerHostname());
// }
// FIXME SpamAssassin says INVALID_MSGID to PHPMailer's generated
// Message-ID. 06/04/2009 smk.
// if (!isset($message['headers']['Message-ID'])) {
// $message['headers']['Message-ID'] = sprintf("<%s@%s>",
// md5(uniqid(time())), $mail->ServerHostname());
// }
$header = mimemail_rfc_headers($message['headers']) . $mail->LE . $mail->LE;
return $mail->SmtpSend($header, $message['body']);
......
......@@ -37,7 +37,7 @@ function phpmailer_settings_form($form, $form_state) {
$form['smtp_on']['#default_value'] = 0;
$form['smtp_on']['#description'] = t('MimeMail has been detected. To enable PHPMailer for mail transport, go to the <a href="@url">MimeMail settings page</a> and select PHPMailer from the available e-mail engines.', array('@url' => url('admin/config/system/mimemail')));
}
elseif (!variable_get('smtp_on', 0) && empty($form_state['input'])) {
elseif (!variable_get('smtp_on', 0) && empty($form_state['values'])) {
drupal_set_message(t('PHPMailer is currently disabled.'), 'warning');
}
......@@ -92,18 +92,16 @@ function phpmailer_settings_form($form, $form_state) {
'NTLM' => 'NTLM',
'XOAUTH2' => 'XOAUTH2',
);
$description = t(
' If you do not specify an authentication type for use when authenticating with the server, the PHPMailer library will attempt to guess one, based on the infomration it receives from the server.'
. ' If that does not work, and you receive authentication failed notices, try specifying the authentication type.'
. ' <br />If you are unsure which type to use, consider the following guidelines:'
. ' <ul>'
. ' <li>If the connection is NOT using a sucure protocol, try CRAM-MD5 first, then try LOGIN or PLAIN.</li>'
. ' <li>If the connection is using a secure protocol, you can try LOGIN or PLAIN first, then CRAM-MD5.</li>'
. ' </ul>'
. ' (CRAM-MD5 hashes the password before sending, so it is not transmitted in the clear.)'
. ' <br />If none of those options work, contact your email hoster to find out what their SMTP server authentication type is.'
. ' <br />The PHPMailer library only supports those types listed.'
);
$description = t('If you do not specify an authentication type for use when authenticating with the server, the PHPMailer library will attempt to guess one based on the infomration it receives from the server.');
$description .= ' ' . t('If it does not work and you receive notices about failed authentication, try specifying the authentication type.');
$description .= '<br />' . t('If you are unsure which type to use, consider the following guidelines:');
$description .= '<ul>';
$description .= '<li>' . t('If the connection is NOT using a secure protocol, try CRAM-MD5 first, then try LOGIN or PLAIN.') . '</li>';
$description .= '<li>' . t('If the connection is using a secure protocol, you can try LOGIN or PLAIN first, then CRAM-MD5.') . '</li>';
$description .= '</ul>';
$description .= t('(CRAM-MD5 hashes the password before sending it, so it is not transmitted "in the clear.")');
$description .= '<br />' . t('If none of those options work, contact your email hoster to find out what their SMTP server authentication type is.');
$description .= '<br />' . t('The PHPMailer library only supports those types listed.');
$form['auth']['smtp_auth_type'] = array(
'#type' => 'select',
'#title' => t('Authentication type'),
......@@ -169,11 +167,17 @@ function phpmailer_settings_form($form, $form_state) {
'#default_value' => variable_get('smtp_encode_headers', 0),
'#description' => t('If you have subjects and names with accented, etc. characters, check this box to UTF-8 encode them before sending the message.'),
);
$debug_options = array(
0 => t('Disabled'),
1 => t('Errors only'),
2 => t('Server responses'),
4 => t('Full communication'),
);
$form['advanced']['smtp_debug'] = array(
'#type' => 'select',
'#title' => t('Debug level'),
'#default_value' => variable_get('smtp_debug', 0),
'#options' => array(0 => t('Disabled'), 1 => t('Errors only'), 2 => t('Server responses'), 4 => t('Full communication')),
'#options' => $debug_options,
'#description' => t("Debug the communication with the SMTP server. You normally shouldn't enable this unless you're trying to debug e-mail sending problems."),
);
$form['advanced']['smtp_debug_log'] = array(
......@@ -236,17 +240,17 @@ function phpmailer_settings_form($form, $form_state) {
$result = phpmailer_send($message);
}
$notice = 'A test e-mail has been sent to %email. You might still want to !watchdog-url for possible error messages.';
$replacements = array(
'%email' => $test_address,
'!watchdog-url' => l(t('check the logs'), 'admin/reports/dblog'),
);
$notice = t('A test e-mail has been sent to %email. You might still want to !watchdog-url for possible error messages.', $replacements);
$message_type = 'status';
if (empty($result) || (is_array($result) && empty($result['result']))) {
$notice = 'A test e-mail has NOT been sent to %email. You should !watchdog-url for error messages.';
$notice = t('A test e-mail has NOT been sent to %email. You should !watchdog-url for error messages.', $replacements);
$message_type = 'error';
}
drupal_set_message(t($notice, $replacements), $message_type);
drupal_set_message($notice, $message_type);
}
$form['test'] = array(
......@@ -297,7 +301,7 @@ function phpmailer_settings_form_submit($form, &$form_state) {
watchdog('phpmailer', 'PHPMailer has been enabled.');
}
}
else if (phpmailer_enabled()) {
elseif (phpmailer_enabled()) {
// Remove PHPMailer from all mail keys it is configured for.
$mail_system = variable_get('mail_system', array('default-system' => 'DefaultMailSystem'));
foreach ($mail_system as $key => $class) {
......@@ -326,7 +330,7 @@ function phpmailer_settings_form_submit($form, &$form_state) {
$settings[] = 'password';
}
foreach ($settings as $setting) {
if ($form_state['values']['smtp_'. $setting] != variable_get('smtp_'. $setting, '')) {
if ($form_state['values']['smtp_' . $setting] != variable_get('smtp_' . $setting, '')) {
watchdog('phpmailer', 'SMTP configuration changed.');
break;
}
......@@ -334,7 +338,7 @@ function phpmailer_settings_form_submit($form, &$form_state) {
}
/**
* Implementation of hook_mail().
* Implements hook_mail().
*/
function phpmailer_mail($key, &$message, $params) {
$message['subject'] = t('PHPMailer test e-mail');
......@@ -342,7 +346,8 @@ function phpmailer_mail($key, &$message, $params) {
}
/**
* Menu callback; Render a HTML mail preview in the browser.
* Renders an HTML mail preview in the browser.
*
* @todo Move to Mime Mail project.
*/
function phpmailer_preview() {
......@@ -352,16 +357,11 @@ function phpmailer_preview() {
$GLOBALS['devel_shutdown'] = TRUE;
$mailkey = 'phpmailer_preview';
// Use example address to prevent usage of configurable mail format setting.
$recipient = 'test@example.com';
// @see user_register_submit()
$language = user_preferred_language($user);
$variables = user_mail_tokens($user, $language);
$variables['!password'] = 'test';
$subject = _user_mail_text('register_no_approval_required_subject', $language, $variables);
$body = _user_mail_text('register_no_approval_required_body', $language, $variables);
$sender = NULL;
$headers = array();
// Convert non-html messages.
// @see drupal_mail_wrapper()
......@@ -370,7 +370,7 @@ function phpmailer_preview() {
// @see mimemail_prepare()
$body = theme('mimemail_message', $body, $mailkey);
foreach (module_implements('mail_post_process') as $module) {
$function = $module .'_mail_post_process';
$function = $module . '_mail_post_process';
$function($body, $mailkey);
}
......
......@@ -6,7 +6,7 @@
*/
/**
* Implementation of hook_requirements().
* Implements hook_requirements().
*/
function phpmailer_requirements($phase) {
$requirements = array();
......@@ -58,24 +58,77 @@ function phpmailer_requirements($phase) {
}
/**
* Implementation of hook_uninstall().
* Implements hook_enable().
*/
function phpmailer_enable() {
if (!phpmailer_enabled() && !(module_exists('mimemail') && variable_get('mimemail_engine', 'mimemail') == 'phpmailer')) {
$t = get_t();
drupal_set_message($t('PHPMailer has been installed, but is currently disabled. <a href="@settings-url">Configure it now</a>.', array('@settings-url' => url('admin/config/system/phpmailer'))));
}
if (module_exists('mailsystem')) {
mailsystem_set(array('phpmailer' => 'DrupalPHPMailer'));
}
}
/**
* Implements hook_disable().
*/
function phpmailer_disable() {
if (phpmailer_enabled()) {
// Remove PHPMailer from all mail keys it is configured for.
$mail_system = variable_get('mail_system', array('default-system' => 'DefaultMailSystem'));
foreach ($mail_system as $key => $class) {
if ($class == 'DrupalPHPMailer') {
if ($key != 'default-system') {
unset($mail_system[$key]);
}
else {
$mail_system[$key] = 'DefaultMailSystem';
}
}
}
variable_set('mail_system', $mail_system);
variable_del('smtp_on');
drupal_set_message(t('PHPMailer has been disabled.'));
}
if (module_exists('mimemail') && variable_get('mimemail_engine', 'mimemail') == 'phpmailer') {
variable_del('mimemail_engine');
drupal_set_message(t('MimeMail e-mail engine has been reset to default.'), 'warning');
}
if (module_exists('mailsystem')) {
mailsystem_clear(array('phpmailer' => 'DrupalPHPMailer'));
}
}
/**
* Implements hook_uninstall().
*/
function phpmailer_uninstall() {
$mail_system = variable_get('mail_system', array('default-system' => 'DefaultMailSystem'));
$mail_system['default-system'] = 'DefaultMailSystem';
variable_set('mail_system', $mail_system);
variable_del('smtp_on');
variable_del('smtp_always_replyto');
variable_del('smtp_auth_type');
variable_del('smtp_debug');
variable_del('smtp_debug_log');
variable_del('smtp_encode_headers');
variable_del('smtp_fromname');
variable_del('smtp_hide_password');
variable_del('smtp_host');
variable_del('smtp_hostbackup');
variable_del('smtp_keepalive');
variable_del('smtp_on');
variable_del('smtp_password');
variable_del('smtp_port');
variable_del('smtp_protocol');
variable_del('smtp_fromname');
variable_del('smtp_username');
variable_del('smtp_password');
variable_del('smtp_keepalive');
variable_del('smtp_debug');
variable_del('smtp_debug_log');
variable_del('ssl_verify_peer');
variable_del('ssl_verify_peer_name');
variable_del('ssl_allow_self_signed');
}
/**
......
......@@ -6,7 +6,7 @@
*/
/**
* Implementation of hook_perm().
* Implements hook_perm().
*/
function phpmailer_permission() {
return array(
......@@ -18,7 +18,7 @@ function phpmailer_permission() {
}
/**
* Implementation of hook_menu().
* Implements hook_menu().
*/
function phpmailer_menu() {
$items['admin/config/system/phpmailer'] = array(
......@@ -41,7 +41,7 @@ function phpmailer_menu() {
}
/**
* Implementation of hook_form_FORM_ID_alter().
* Implements hook_form_FORM_ID_alter().
*/
function phpmailer_form_mimemail_admin_settings_alter(&$form, &$form_state) {
// Hide the Mime Mail global enabler setting if phpmailer is used to deliver
......@@ -71,7 +71,7 @@ function phpmailer_enabled() {
}
/**
* Implementation of hook_mailengine().
* Implements hook_mailengine().
*/
function phpmailer_mailengine($op, $message = array()) {
if (!phpmailer_library_exists()) {
......@@ -103,11 +103,11 @@ function phpmailer_mailengine($op, $message = array()) {
/**
* Extract address and optional display name of an e-mail address.
*
* @param $string
* @param string $string
* A string containing one or more valid e-mail address(es) separated with
* commas.
*
* @return
* @return array
* An array containing all found e-mail addresses split into mail and name.
*
* @see http://tools.ietf.org/html/rfc5322#section-3.4
......@@ -173,52 +173,6 @@ function phpmailer_preview_access() {
return FALSE;
}
/**
* Implementation of hook_enable().
*/
function phpmailer_enable() {
if (!phpmailer_enabled() && !(module_exists('mimemail') && variable_get('mimemail_engine', 'mimemail') == 'phpmailer')) {
$t = get_t();
drupal_set_message($t('PHPMailer has been installed, but is currently disabled. <a href="@settings-url">Configure it now</a>.', array('@settings-url' => url('admin/config/system/phpmailer'))));
}
if (module_exists('mailsystem')) {
mailsystem_set(array('phpmailer' => 'DrupalPHPMailer'));
}
}
/**
* Implementation of hook_disable().
*/
function phpmailer_disable() {
if (phpmailer_enabled()) {
// Remove PHPMailer from all mail keys it is configured for.
$mail_system = variable_get('mail_system', array('default-system' => 'DefaultMailSystem'));
foreach ($mail_system as $key => $class) {
if ($class == 'DrupalPHPMailer') {
if ($key != 'default-system') {
unset($mail_system[$key]);
}
else {
$mail_system[$key] = 'DefaultMailSystem';
}
}
}
variable_set('mail_system', $mail_system);
variable_del('smtp_on');
drupal_set_message(t('PHPMailer has been disabled.'));
}
if (module_exists('mimemail') && variable_get('mimemail_engine', 'mimemail') == 'phpmailer') {
variable_del('mimemail_engine');
drupal_set_message(t('MimeMail e-mail engine has been reset to default.'), 'warning');
}
if (module_exists('mailsystem')) {
mailsystem_clear(array('phpmailer' => 'DrupalPHPMailer'));
}
}
/**
* Implements hook_registry_files_alter().
*
......
......@@ -5,7 +5,14 @@
* PHPMailer tests.
*/
/**
* Class for testing the PHPMailer module.
*/
class PHPMailerUnitTestCase extends DrupalUnitTestCase {
/**
* Define this test's meta data.
*/
public static function getInfo() {
return array(
'name' => 'E-mail address parser',
......@@ -14,13 +21,16 @@ class PHPMailerUnitTestCase extends DrupalUnitTestCase {
);
}
/**
* {@inheritDoc}
*/
function setUp() {
parent::setUp();
drupal_load('module', 'phpmailer');
}
/**
* Test e-mail address extraction using phpmailer_parse_address().
* Tests e-mail address extraction using phpmailer_parse_address().
*/
function testAddressParser() {
// Set up various test addresses according to RFC 5322.
......@@ -28,42 +38,42 @@ class PHPMailerUnitTestCase extends DrupalUnitTestCase {
// addr-spec.
array(
'mail' => 'user-1@domain.tld',
'name' => ''
'name' => '',
),
// Invalid but supported angle-addr without preceding display-name.
'<user-2@domain.tld>' => array(
'mail' => 'user-2@domain.tld',
'name' => ''
'name' => '',
),
// Unquoted atom name-addr.
'John Doe <user-3@domain.tld>' => array(
'mail' => 'user-3@domain.tld',
'name' => 'John Doe'
'name' => 'John Doe',
),
// Quoted atom name-addr.
'"John Doe" <user-4@domain.tld>' => array(
'mail' => 'user-4@domain.tld',
'name' => 'John Doe'
'name' => 'John Doe',
),
// name-addr with a quoted-string in display-name.
array(
'mail' => 'user-5@domain.tld',
'name' => 'John "The Dude" Doe'
'name' => 'John "The Dude" Doe',
),
// name-addr with a quoted-string and comma in display-name.
array(
'mail' => 'user-6@domain.tld',
'name' => 'John "The Dude" Doe (Foo, Bar)'
'name' => 'John "The Dude" Doe (Foo, Bar)',
),
// name-addr containing non-ASCII chars in display-name.
array(
'mail' => 'user-7@domain.tld',
'name' => 'Jöhn "The Düde" Döe'
'name' => 'Jöhn "The Düde" Döe',
),
);
$all = array();