Удалить имя из переменных от кого и кому можно в файле /classes/Mail.php
Поле от кого - from_name
// Sending an e-mail can be of vital importance for the merchant, when his password is lost for example, so we must not die but do our best to send the e-mail
if (!isset($from) || !Validate::isEmail($from))
$from = $configuration['PS_SHOP_EMAIL'];
if (!Validate::isEmail($from))
$from = null;
// $from_name is not that important, no need to die if it is not valid
if (!isset($from_name) || !Validate::isMailName($from_name))
$from_name = $configuration['PS_SHOP_NAME'];
if (!Validate::isMailName($from_name))
$from_name = null;
Поле кому - to_name
/* Construct multiple recipients list if needed */
$to_list = new Swift_RecipientList();
if (is_array($to) && isset($to))
{
foreach ($to as $key => $addr)
{
$addr = trim($addr);
if (!Validate::isEmail($addr))
{
Tools::dieOrLog(Tools::displayError('Error: invalid e-mail address'), $die);
return false;
}
if (is_array($to_name))
{
if ($to_name && is_array($to_name) && Validate::isGenericName($to_name[$key]))
$to_name = $to_name[$key];
}
if ($to_name == null || $to_name == $addr)
$to_name = '';
else
{
if (function_exists('mb_encode_mimeheader'))
$to_name = mb_encode_mimeheader($to_name, 'utf-8');
else
$to_name = self::mimeEncode($to_name);
}
$to_list->addTo($addr, $to_name);
}
$to_plugin = $to[0];
} else {
/* Simple recipient, one address */
$to_plugin = $to;
if ($to_name == null || $to_name == $to)
$to_name = '';
else
{
if (function_exists('mb_encode_mimeheader'))
$to_name = mb_encode_mimeheader($to_name, 'utf-8');
else
$to_name = self::mimeEncode($to_name);
}
$to_list->addTo($to, $to_name);
}
Формирование заголовка
/* Send mail */
$send = $swift->send($message, $to, new Swift_Address($from, $from_name));
Отправка сообщений о заказе и т.д.
public static function Send($id_lang, $template, $subject, $template_vars, $to, $to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null, $template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null, $bcc = null)
Можно сделать так, как происходит отправка тестового сообщения. В нем нет имени в полях от кого и кому.
public static function sendMailTest($smtpChecked, $smtpServer, $content, $subject, $type, $to, $from, $smtpLogin, $smtpPassword, $smtpPort = 25, $smtpEncryption)