[TYPO3-dev] Images disappear when sending mail from cronjob
Brian Bendtsen
bb at bellevuevej.dk
Wed Oct 1 00:18:22 CEST 2008
Hi
I have been working with an extension thats suppose to send html
formatted emails to users automatically by using a cronjob.
there is a script called mailer.sh which works when I run it manually
from a command line, but running it from a cronjob it "acts" differently
and I think I have found out why.
When the script is invoked by the cronjob, not all mails are received,
looks like the server is sending them though, and the mails that are
received has no images.
I have been doing a lot of debugging in the extension itself without
getting any furter, but then I tried debugging the
class.t3lib_htmlmail.php I found out the the array
$this->theParts['html']['media'] is empty when sending via cronjob and
this somehow has to do with the problem.
If I comment out the lines(666-671):
--------
$this->add_message("--".$boundary);
$this->add_message('Content-Type: '.$media['ctype']);
$this->add_message('Content-ID: <part'.$key.'.'.$this->messageid.'>');
$this->add_message('Content-Transfer-Encoding: base64');
$this->add_message('');
$this->add_message($this->makeBase64($media['content']));
--------
All the mails are sent but no images are shown, which is to be expected
I guess :)
Does anybody have an idea about why the media files are "removed" when
running the script from a cronjob?
Where does the array $this->theParts['html']['media'] get its data?
/Brian Bendtsen
More information about the TYPO3-dev
mailing list