Project

General

Profile

Actions

Bug #25220

closed

t3lib_div::t3lib_htmlmail->sendtheMail() is unable to send mail with attachments

Added by RENIER about 13 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Miscellaneous
Target version:
-
Start date:
2011-03-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.2
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

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)

Actions #1

Updated by Alexey Gafiulov almost 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.

Actions #2

Updated by Patrick Broens over 11 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.

Actions #3

Updated by Jose Antonio Guerra about 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?

Actions #4

Updated by Stefan Galinski about 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! :-)

Actions #5

Updated by Alexey Gafiulov about 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.

Actions #6

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?

Actions #7

Updated by Daniel Gercke about 9 years ago

Yes. Issue still exists in 4.5.40

Actions #8

Updated by Riccardo De Contardi almost 9 years ago

what about the latest versions? 6.2.12 or 7(master) ? Is this still present?

Actions #9

Updated by Frederic Gaus almost 9 years ago

There is another open issue at swiftmailer

https://github.com/swiftmailer/swiftmailer/issues/356

Actions #10

Updated by Alexander Opitz over 8 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.

Actions

Also available in: Atom PDF