From the addons description:
So I don't need to fill-up or enable these options?
View attachment 269576
@Sim
Any idea why my user registration email validations send so delayed? It takes a good like 3-5 minutes whereas when I send a test outbound mail on ACP>tools it goes instant.
It's keeping me from launching my website since validation emails are critical for my project. If you can help (if fee is needed I can do that) please do!
DKIM, SPF, etc are all showing good on SparkPost's end.
jobRunTrigger
in the admin options.Ah, this is interesting! I will try to set it to server based trigger since yes it is a new websiteIs this a new website with very little traffic on it?
Are you using the "Activity based trigger" for jobs or the "Server based trigger"?
Search forjobRunTrigger
in the admin options.
For a new site with not much traffic, it can take some time for the activity based trigger to send emails - whereas the server based trigger runs externally via a cron task and so isn't affected by traffic or a lack thereof.
Any idea why my cronjob from the addon is failing? Error below.Is this a new website with very little traffic on it?
Are you using the "Activity based trigger" for jobs or the "Server based trigger"?
Search forjobRunTrigger
in the admin options.
For a new site with not much traffic, it can take some time for the activity based trigger to send emails - whereas the server based trigger runs externally via a cron task and so isn't affected by traffic or a lack thereof.
Server error log
[LIST]
[*]SparkPost\SparkPostException: Job Hampel\SparkPostMail:MessageEvent: {"errors":[{"param":"from","message":"from must be before to","value":"2022-08-29T07:52:00"}]}
[*]src/addons/Hampel/SparkPostMail/vendor/sparkpost/sparkpost/lib/SparkPost/SparkPostPromise.php:77
[*]Generated by: Unknown account
[*]Aug 29, 2022 at 8:52 AM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
#0 src/addons/Hampel/SparkPostMail/SubContainer/SparkPost.php(76): SparkPost\SparkPostPromise->wait()
#1 src/addons/Hampel/SparkPostMail/Job/MessageEvent.php(50): Hampel\SparkPostMail\SubContainer\SparkPost->getMessageEvents(1, 1000, Array, 1661759543, 1661759544)
#2 src/XF/Job/Manager.php(260): Hampel\SparkPostMail\Job\MessageEvent->run(8)
#3 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#4 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#5 job.php(43): XF\Job\Manager->runQueue(false, 8)
#6 {main}
-------------
Previous GuzzleHttp\Exception\ClientException: Client error: `GET https://api.sparkpost.com/api/v1/events/message?page=1&per_page=1000&events=bounce,policy_rejection,out_of_band,generation_rejection,spam_complaint,list_unsubscribe,link_unsubscribe&from=2022-08-29T07%3A52&to=2022-08-29T07%3A52` resulted in a `400 Bad Request` response:
{"errors":[{"param":"from","message":"from must be before to","value":"2022-08-29T07:52:00"}]}
- src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
#0 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), NULL)
#3 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#4 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(118): GuzzleHttp\Promise\TaskQueue->run()
#5 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(145): GuzzleHttp\Handler\CurlMultiHandler->tick()
#6 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Handler\CurlMultiHandler->execute(true)
#7 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()
#8 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#9 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#10 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#11 src/addons/Hampel/SparkPostMail/vendor/php-http/guzzle6-adapter/src/Promise.php(94): GuzzleHttp\Promise\Promise->wait(false)
#12 src/addons/Hampel/SparkPostMail/vendor/sparkpost/sparkpost/lib/SparkPost/SparkPostPromise.php(73): Http\Adapter\Guzzle6\Promise->wait(true)
#13 src/addons/Hampel/SparkPostMail/SubContainer/SparkPost.php(76): SparkPost\SparkPostPromise->wait()
#14 src/addons/Hampel/SparkPostMail/Job/MessageEvent.php(50): Hampel\SparkPostMail\SubContainer\SparkPost->getMessageEvents(1, 1000, Array, 1661759543, 1661759544)
#15 src/XF/Job/Manager.php(260): Hampel\SparkPostMail\Job\MessageEvent->run(8)
#16 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#17 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#18 job.php(43): XF\Job\Manager->runQueue(false, 8)
#19 {main}
[HEADING=2]Request state[/HEADING]
Any idea why my cronjob from the addon is failing? Error below.
I'm pretty sure I got my API key inserted right.
Got it. It only came up once and haven't happened again.How many times have you received this error?
It shouldn't occur during normal operation - the XF cron task for fetching message events doesn't run frequently enough to cause this issue.
What can happen is that if it is run multiple times in quick succession, you'll receive an error because the SparkPost API is a bit fussy about the "from" and "to" dates being too close together (even if they are actually a second apart!!). So if you had a backlog of XF jobs waiting to be processed, it might happen - but should not happen once the backlog is cleared.
So if it only happened when you first changed to the server based trigger and hasn't happened since, I wouldn't worry about it.
However, if you do continue to receive the error, please do let me know!
Ok. Hoping to get my situation resolved as it needs registration email validations. Darn microsoft outlook has a huge delay for some reason.Nope, decided to switch to discord-only registrations
So something new. Adding to my error above, when I do a normal test outbound mail at /admin.php?tools/test-email it delivers instantly.
When I try the sparkpost version at /admin.php?tools/test-sparkpostmail and set it to transactional emails, it takes like 3 mins or so to deliver.
Any idea what's going on Sim?
I also have server based trigger on with these results. I don't think this is the issue since I run the server trigger command manually php /home/public_html/cmd.php xf:run-jobs and it says all xf outstanding jobs have run.
tools/test-email
what is the Email transport class
set to?I do have this notification that's glaring at me though since I changed it to server trigger Can't even dismiss it.... I have the server trigger command to execute every minute through Ubuntu's traditional crontab file. Any idea why I'm getting this error?
trigger_date
in xf_job
is more than an hour ago, the message will show in the admin.xf_job
table and identify the lowest value of trigger_date
and then check it againt the current time using a site like https://www.unixtimestamp.com/ - you should get an idea about when the next job is scheduled to run. If it's in the past, then you'll see the error message in the admin UI.We use essential cookies to make this site work, and optional cookies to enhance your experience.