Closed schrej-zz closed 2 years ago
is your "$GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress']" filled? The script get the default address.
Yes, it's filled with the default address. As I said, it worked in 9.5.x
I also see in the debug that the following is transfered to the routine:
Sng\Additionalscheduler\Utils::sendEmail('webmaster@xxx.de', 'Removed old Backups', '/kunden/homepages/11/d5823494yy/htdocs/xxx/htdocs/tools/rm_backup.sh', 'plain', 'utf-8')
Maybe the from[0] doesn't get the right value in utils.php:
if (version_compare(TYPO3_version, '10.4.0', '>=')) { $mail ->from(new Address($from[0])) ->to(new Address($to)) ->subject($subject);
as here you changed anything for version 10.4.x and upwards
I'm poking around in the dark a little bit. I think based on the documentation, new Address($from needs 2 Arguments. The second one is the "$GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'] See: ->from(new Address('jeremy@acme.com', 'Jeremy'))
Well, I think, in 10.x, there is no need for defining "$from" anymore,, and I'm not sure, if the "$from = MailUtility::getSystemFrom();" fuction delivers any reasonable value in 10.4.
So I tried to just comment the "->from(new Address($from[0]))" out, as the value is automatically set from my understanding.
And now it works again. Shell script runs and sends expected mail with right "From" and "From Name".
Joerg
Had the same Error on TYPO3 10. Commenting out the line ->from(new Address($from[0]))
in
typo3conf/ext/additional_scheduler/Classes/Utils.php
worked.
There was no more feedback from Apen, but I think, the issue is solved in newer versions. Therefore, I close the issue.
Nice, thanks for the feedback and sorry for late response...
Hi, after updateting to 10.4.x and additional_scheduler 1.5.6, I get the following exeption when executing a shell script:
This worked with 9.5.x