dpi / courier

Courier is a Drupal module providing a framework to send messages to entities.
https://drupal.org/project/courier
GNU General Public License v2.0
8 stars 3 forks source link

Email messaging to Contact Identities fails #40

Closed auVeypor closed 7 years ago

auVeypor commented 7 years ago

Hey @dpi,

We are trying to use your Identity module in combination with RNG and Courier to allow anonymous users to register for an event, however we have found that Courier fails when attempting to send an email to the Contact Identity.

The dblog error message lists:

No messages could be sent to . No messages were generated.

Which is generated from the sendMessage function (/src/Service/CourierManager.php line 93)

If you could please advise, we would be grateful.

robertpharries commented 7 years ago

Hi @dpi,

I am a colleague of @auVeypor and with the given problem that we had with the messaging system for identity, I thought I would have a poke around and see if I could modify the Courier/Identity Contact modules to allow courier to send messages that are to Contact entity types, not just users.

After an hour or two of reading the code, I developed a solution, which included:

I am more than happy to provide to you these changed files/modules if you are interested. Just let us know how you'd like us to do so if this is the case.

Thanks.

dpi commented 7 years ago

This issue should have been filed against Identity.

Keep in mind that: Identity is not fully supported (dpi/identity#1).

config/install/courier.settings.yml file.

This is managed by Courier settings UI already...

Identity Contact file [...] with the methods to retrieve the name and the email address from the Identity Contact.

This file already exists... https://github.com/dpi/identity/blob/8.x-1.x/identity_contact/src/Plugin/IdentityChannel/CourierEmail/IdentityContact.php

I am more than happy to provide to you these changed files/modules if you are interested. Just let us know how you'd like us to do so if this is the case.

If above comments do not address your concerns, feel free to post a PR to the Identity project.

robertpharries commented 7 years ago

Apologies for the incorrectly placed issue thread. Originally the error messages were generated by courier so that's what we took as the issue.

In regards to the identity channel plugin, I have found that, and understand how it functions now. Plugins were something we were not familiar with but lesson learned.

For the courier.settings file I'm not sure on what you mean about it being managed by the UI. I have found the settings for courier in the site configuration but was unable to locate anything to do with identity. Would you be able to explain this further?

Overall I feel as if this is a bit of a non-issue now and the messaging is now functioning. Thanks for helping regardless of our misunderstanding.

dpi commented 7 years ago

For the courier.settings file I'm not sure on what you mean about it being managed by the UI.

What I mean is there are no hidden settings in Courier, you are not required to make manual edits to YAML or site config. All settings are available in UI.

but was unable to locate anything to do with identity.

/admin/config/communication/courier

identc

auVeypor commented 7 years ago

Holy kittens, this is still open. Apologies! We got this all sorted out, so I'll close this!

Thanks for your help @dpi