Rewritten after @brianteeman first test
There are the two options for contacts 'Contact Form: Show/Hide' show_email_form and 'Custom Reply: No/Yes' custom_reply. These are available once globally for the component and once individually for each contact. Problems are:
Ensure the default: Components > Contacts > Contacts > Options > Form
Create a contact, linked to user
Ensure the contacts default settings:
Create menu item 'Single contact' with this contact
4a. Open site and send email with the contact form
4b. Send email with API /v1/contacts/form/ID
6a. Open site contact form
6b. Send email with API /v1/contacts/form/ID
8a. Open site and send email with the contact form
8b. Send email with API /v1/contacts/form/ID
10a. Open site and send email with the contact form
12a. Open site and send email with the contact form
12b. Send email with API /v1/contacts/form/ID
5.4
4a. Email from Joomla is sent from site contact form
4b. Email from Joomla is sent from API
6a. Single Contact Menu doesn't show the email form
6b. Email from Joomla is sent from API
8a. No email is sent from Joomla, email is sent from 3rd-party plugin
8b. No email is sent from Joomla, email is sent from 3rd-party plugin
10a. Single Contact Menu doesn't show the email form
12a. No email is sent from Joomla, email is sent from 3rd-party plugin
12b. No email is sent from Joomla, email is sent from 3rd-party plugin
4a. No email sent ✅ Joomla email is sent from site contact form
4b. ❌ API call fails with 500 RuntimeException: Display email form disabled., no email sent from Joomla
6a. ✅ Single Contact Menu doesn't show the email form
6b. ❌ API call fails with 500 RuntimeException: Display email form disabled., no email sent from Joomla. Hiding the contact form is unrelated to sending an email (were we have the other option 'Custom Reply'), right?
8a. ✅ No email is sent from Joomla (email from 3rd-party plugin isn't tested)
8b. ❌ API call fails with 500 RuntimeException: Display email form disabled., no email sent from Joomla
10a. ❌ Single Contact Menu shows the email form
12a. ❌ Single Contact Menu sends Joomla email
12b. ❌ API call sends Joomla email
Tested with JBT and 5.4.7-dev
| Labels |
Added:
No Code Attached Yet
bug
|
||
When you linked the contact to the user did you also add the email address to the contact or did you assume that it would be picked up from the user table?
I have tested 4a on both joomla 5.4 and 6.1
In both cases an email was sent and received
In both cases an email was sent and received
Thank you for your retest. I did a quick retest of 4a with my 6.1.2-dev instance and yes, I received an email too; I have to check my 5.4.7-dev installation what is the difference sometimes later
@brianteeman I was a bit too quick last week. I have now re-tested the issue and rewritten the description, including several additional failing test cases. Thank you.
| Title |
|
||||||
The 'Contact Form: Hide' prevents the API from sending Joomla email.
when contact form: hide you can't send an email from the web so why should you be able to do it from the API?
The 'Contact Form: Hide' prevents the API from sending Joomla email.
when contact form: hide you can't send an email from the web so why should you be able to do it from the API?
Not being able to send an email from the site when the form is hidden is only a secondary effect. For me, this option controls only the visibility of the form.
For the API, form visibility is not required to send an email. I would also assume that calling this API endpoint implies the intention to send an email.
The only way we have to control if an email is sent to a contact is to disable the form so I do not share your assumption.
For example the magazine site has a contact for each author so it can display the authors articles but the form is not enabled as we would not want them to get email
When you linked the contact to the user did you also add the email address to the contact or did you assume that it would be picked up from the user table?