peppeocchi / php-cron-scheduler

PHP cron job scheduler
MIT License
811 stars 144 forks source link

Send output in body instead of attachment #73

Open rafal-sokolowski opened 6 years ago

rafal-sokolowski commented 6 years ago

It'd be great to have the ability to insert a job output directly in the message body, not as an attachment. I receive lots of emails with the output which is always a short plain text and it's quite inconvenient to open every single one.

Besides, it looks like the body specified in the job is always replaced with "Cronjob output attached" defined inaddPart method in Mailer.php

$scheduler->configure([
    'email' => [
        'subject' => 'Test subject',
        'body' => 'Test body',
    ]
]);

/src/GO/Traits/Mailer.php ->setBody($config['body'], 'text/html') ->addPart('<q>Cronjob output attached</q>', 'text/html');

yratof commented 5 years ago

Any news on if this enhancement will ever make it to Master @peppeocchi ?

TwinMist commented 5 years ago

how do you configure this to work?

TwinMist commented 5 years ago

how does this work?

pdolinaj commented 1 year ago

This would be indeed great feature! I receive tons of Crons and opening attachments each time is real pain :(