Bug #25220
closedt3lib_div::t3lib_htmlmail->sendtheMail() is unable to send mail with attachments
0%
Description
When trying to send a mail with an attachement (one ZIP file, about 1.5Mb), the sendtheMail() function does report a fatal error :
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 16 bytes) in /var/www/.typo3_src/typo3_src-4.5.2/typo3/contrib/swiftmailer/classes/Swift/CharacterReader/Utf8Reader.php on line 99
with Typo3 4.4.7, it works fine.
ps : the error line number on Utf8Reader.php can takes different values : 99, 113
for information, my code is :
$oHtmlMail = t3lib_div::makeInstance('t3lib_htmlmail');
$oHtmlMail->start();
$oHtmlMail->subject = $subject;
$oHtmlMail->from_email = $this->conf['emailFrom'];
$oHtmlMail->replyto_email = $this->conf['emailFrom'];
$oHtmlMail->setRecipient($dest);
$oHtmlMail->setHTML($textEmail);
$oHtmlMail->addAttachment("/tmp/$filename");
$oHtmlMail->setHeaders();
$oHtmlMail->setContent();
$okCustEmail = $oHtmlMail->sendtheMail();
(issue imported from #M17821)
Updated by Alexey Gafiulov over 13 years ago
- Target version deleted (
0)
Out of memory error could appear in another file /typo3_src-4.5.2/typo3/contrib/swiftmailer/classes/Swift/CharacterStream/NgCharacterStream.php on line 256.
Generally the only solution I found is disabling SwiftMailer and switch to old one.
Using SwiftMailer is making impossible to send any emails with attachments, no matter how much memory I allow for php and how small attached file is.
Out of memory with 2kb attachment and memory limit of 128Mb is nonsense.
Updated by Patrick Broens almost 12 years ago
- Category set to Miscellaneous
- Target version set to 4.5.23
- Complexity set to medium
I've noticed the same here with a server which has 512mb allocated and sending an attachment of 1kb with powermail. SwiftMailer uses an incredible amount of memory when it comes to sending attachments.
Updated by Jose Antonio Guerra over 11 years ago
This is still an open issue in SwiftMailer:
https://github.com/swiftmailer/swiftmailer/issues/88
Anyone daring to fix, send a pull request on Github and then upgrading the version on the core?
Updated by Stefan Galinski over 11 years ago
- Status changed from New to On Hold
Just set this to on hold as it's an external issue. Thanks for the link Jose! :-)
Updated by Alexey Gafiulov over 11 years ago
I am not sure that swiftmailer issue 88 is directly about this topic.
It is about sending huge mails, more than 1 mb of html text, while this typo3 issue is about sending normal size (less than 100 kb) mails with tiny attachment, like 2kb.
Updated by Mathias Schreiber over 9 years ago
- Status changed from On Hold to Needs Feedback
- Assignee set to Mathias Schreiber
- Is Regression set to No
Is this still an issue?
Updated by Riccardo De Contardi about 9 years ago
what about the latest versions? 6.2.12 or 7(master) ? Is this still present?
Updated by Frederic Gaus about 9 years ago
There is another open issue at swiftmailer
Updated by Alexander Opitz almost 9 years ago
- Status changed from Needs Feedback to Closed
- Assignee deleted (
Mathias Schreiber) - Target version deleted (
4.5.23)
No feedback within the last 90 days => closing this issue.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.