Queue feature is only partially implemented and watchdog part of it is outdated.

Issue fork smtp-2774737

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

audriusb created an issue. See original summary.

audriusb’s picture

StatusFileSize
new2.69 KB
audriusb’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: 2774737-2.patch, failed testing.

The last submitted patch, 2: 2774737-2.patch, failed testing.

jorgik’s picture

Status: Needs work » Needs review
StatusFileSize
new3.53 KB

Hi, 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

wundo’s picture

Status: Needs review » Needs work

Needs re-roll

jorgik’s picture

StatusFileSize
new3.74 KB

Re-rolled patch, please review.

jorgik’s picture

Status: Needs work » Needs review
arakwar’s picture

Wouldn'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.

ravi.shankar’s picture

Status: Needs review » Needs work
rivimey’s picture

I 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!

rivimey’s picture

mxr576’s picture

How 1.0 could have been released without this important feature being fixed? :(

mxr576’s picture

Priority: Normal » Major
Issue tags: +Needs tests
StatusFileSize
new4.11 KB
new5.34 KB

SMTPConfigFormTest needs to be extended for sure, I am not sure if/how you would like to test the "send in queue" feature.

mxr576’s picture

StatusFileSize
new4.65 KB
new1.13 KB

Meh, I did not spot the deprecated usage of t() in the class.
Also extended the SMTPConfigFormTest.

tr’s picture

How 1.0 could have been released without this important feature being fixed? :(

You 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 about smtp_send_queue() and smtp_send_queue_runner()? The smtp_queue_runner() function is not used and smtp_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 contain hook_help() and hook_mail() - everything else needs to be deleted or put in a service.)

bluegeek9 made their first commit to this issue’s fork.

bluegeek9’s picture

Title: Fix queue support » Remove queue support
Priority: Major » Normal
Issue tags: -Needs tests

I 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.

bluegeek9’s picture

Assigned: Unassigned » bluegeek9
Status: Needs work » Active
damienmckenna’s picture

Honestly, sites should switch to Symfony Mailer as it's being merged (slowly) into core.

bluegeek9’s picture

bluegeek9’s picture

Assigned: bluegeek9 » Unassigned
Status: Active » Needs review

bluegeek9’s picture

Status: Needs review » Fixed
//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support makes this project sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:
  • Triage issues and adding more context to existing issues.
  • Flagging SMTP as a favorite on the project page to help others discover it and show your support.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

imclean’s picture

Queue Mail works well.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.