php - phpmailer attachment failing whenever I execute file with cronjob/mail to outerside clients but works whenever I run script from command line -


i upgraded website emails (sent via aws ses) have html format attached image few days ago. using phpmailer. when test runs either email on domain or personal email - in high volume - runs great.

in contrast, when cronjob has executed same script mail other websites users, file attachment has not gone through (or possibly all) of time. related being cronjob? have simulated higher volume on own use when emailing site users, it's not volume/rate limiting problem.

it quite reliably failing when run cronjob though simple php script has nothing environmental dependencies. have advice debugging? related post saw here:

attachments working intermittently

very path problem - cron jobs not set path environment var default, set 1 in cron script, or use absolute paths everything.

for example if say:

php myscript.php 

it may not find php binary or script, or attachment, this:

path=/usr/bin php myscript.php 

or

/usr/bin/php /path/to/myscript.php 

you need tell error - "it doesn't work" isn't useful information.


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -