Kleiner Workaround, der zwar nicht Updatefähig ist, aber funktioniert ;-)
Dabei wird in der localconfig.php eine neue Konfiguraiton für Emailadresse und Name des Absenders hinterlegt.
Wenn diese Werte da sind, werden diese bevorzugt...
localconfig.php
Folgende Werte ergänzen:
PHP-Code:
$GLOBALS['TL_CONFIG']['emailFromAddress'] = 'info@absender.de';
$GLOBALS['TL_CONFIG']['emailFromName'] = 'DER ABSENDER';
Form.php
Das hier
PHP-Code:
// Set the admin e-mail as "from" address
$email->from = $GLOBALS['TL_ADMIN_EMAIL'];
$email->fromName = $GLOBALS['TL_ADMIN_NAME'];
Durch dieses hier ersetzen und oberen Codeblock auskommentieren:
PHP-Code:
//Check, if some emailFromAddress and emailFromName is set in localconfig.php
$emailFromAddress = $GLOBALS['TL_CONFIG']['emailFromAddress'];
$emailFromName = $GLOBALS['TL_CONFIG']['emailFromName'];
$email->from = (strlen($emailFromAddress) ? $emailFromAddress : $GLOBALS['TL_ADMIN_EMAIL']);
$email->fromName = (strlen($emailFromName) ? $emailFromName : $GLOBALS['TL_ADMIN_NAME']);
Lesezeichen