Closed (fixed)
Project:
SMTP Authentication Support
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Jul 2016 at 14:17 UTC
Updated:
18 Nov 2025 at 04:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
audriusb commentedComment #3
audriusb commentedComment #6
jorgik commentedHi, I added some changes in patch. Added values for smtp_queue checkbox in schema and install files, added test directory with smtp_cron_queue_test module
Watchdog I fixed in another issue, removed from patch. Needs review
Comment #7
wundo commentedNeeds re-roll
Comment #8
jorgik commentedRe-rolled patch, please review.
Comment #9
jorgik commentedComment #10
arakwarWouldn't it make sense to cover these scenarios :
- Queue the mail again if it fails and raise an error in watchdog about it
- Allow the module to "send mail right away and queue the failure to retry them later"
It would make this module a lot more robust, right now we have issues with our SMTP server and we lose the emails since they are not queued in Drupal.
I could work on this patch and the current dev branch to add the feature and look how Drupal tests works.
Comment #11
ravi.shankar commentedComment #12
rivimeyI agree there should definitely be support for queue-on-fail - it is one of the main reasons I would want to include use of the queue.
On a visual check, the code looks sane and reasonable, as far as it goes.
@arakwar, if you would extend the patch that would be very helpful.
However, the latest patch also deletes the smtptest class - while the class is not a very useful one, it should not be deleted as a side effect. Even better would be to make the tests work!
Comment #13
rivimeyComment #14
mxr576How 1.0 could have been released without this important feature being fixed? :(
Comment #15
mxr576SMTPConfigFormTest needs to be extended for sure, I am not sure if/how you would like to test the "send in queue" feature.
Comment #16
mxr576Meh, I did not spot the deprecated usage of t() in the class.
Also extended the SMTPConfigFormTest.
Comment #17
tr commentedYou mean aside from the fact that the last working patch was more than 4 years ago in #6, and the fact that the community hasn't shown much interest in this at all?
That said, the patch in #16 is a good step forward. It does add 6 new coding standards problems - those should be corrected.
Also, does this really work? There are no tests. A quick scan of the existing code and the patch shows that there is a
hook_queue_info()in smtp.module, but that hook does not exist in D8. Is there anything else that needs to be added/removed/updated for queue support in D8? What aboutsmtp_send_queue()andsmtp_send_queue_runner()? Thesmtp_queue_runner()function is not used andsmtp_send_queue()is a trivial and needless procedural wrapper around createItem() - the Mail plugin should just call createItem() directly. I also don't see many of the things I would expect to see in code that uses the core queueing system - where is the createQueue() call and where is the deleteQueue() call, for example?This feature also needs at least minimal documentation in README.txt - what is the name of the queue used, for example? If users know that they can use drush to check on the queue. Also, there should be mention about how to enable the queue - including a note that cron is required for this feature to work.
(Also, probably should be in a different issue, but what's the deal with
_smtp_mailer_send()? That really needs to be eliminated as part of the port to D8 ... smtp.module should only containhook_help()andhook_mail()- everything else needs to be deleted or put in a service.)Comment #19
bluegeek9 commentedI think the queue support should be removed entirely.
There has not been a desire from the community and the existing queue code is not working.
Comment #20
bluegeek9 commentedComment #21
damienmckennaHonestly, sites should switch to Symfony Mailer as it's being merged (slowly) into core.
Comment #22
bluegeek9 commentedComment #24
bluegeek9 commentedComment #26
bluegeek9 commentedComment #28
imclean commentedQueue Mail works well.