Closed (fixed)
Project:
YAML Form
Version:
8.x-1.0-beta9
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Jul 2016 at 17:48 UTC
Updated:
1 Dec 2016 at 13:35 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jrockowitz commentedI am pretty sure that webforms has a solution and it just needs to be ported to this module.
Comment #3
jrockowitz commentedComment #5
jrockowitz commentedOkay here is a patch without any tests.
To use short form (Windows friendly) from email addresses you need to...
@NYSolutions.com Please see if this fixes your problem.
Comment #6
NYSolutions.com commentedThank you for your quick work.
I applied the patch, changed the setting however it is still not working.
Comment #8
jrockowitz commentedSo I am pretty sure the issue was that the YAML form module is attempting to provide support for sending HTML emails and this was blocking the SMTP module from handling emails send by the YAML form module.
Please test the attached patch. You can use the Status Report (/admin/reports/status) to confirm that the SMTP module is now handling sending out the YAML form module's emails.
Comment #9
NYSolutions.com commentedIs there a new setting for email provider somewhere.
Status showing YAML form email: HTML support Provided by the YAML Form module
Comment #11
jrockowitz commentedIt is probably because you have the SMTP module and YAML form module already enabled.
The attached patch includes an update hook that should address this. If not, please try reinstalling the SMTP module.
Comment #12
NYSolutions.com commentedSorry I must be doing something wrong, this last patch does not seem to be applying, I am really new at applying patches.
Attached is log of install of all 3 patches. the 1st 2 went smoothly, however the last one shows errors.
Comment #13
AsadKamil commentedComment #14
jrockowitz commented@nysolutions Another approach is to checkout the feature branch.
https://www.drupal.org/node/2640714/git-instructions/2770071-smtp-authen...
Comment #15
NYSolutions.com commentedI completely uninstalled the module and reinstalled from the feature branch. I reinstalled the smtp module.
Email still not working.
Status report no longer showing the line about email only yaml reference now is YAML form: CodeMirror (CDN)
Comment #16
jrockowitz commentedThe patch is not being applied correctly. Try the attached zip.
Comment #17
NYSolutions.com commentedI got back the yaml info on the status page, however email still showing provided by yaml and not working for me.
Comment #18
jrockowitz commented@AsadKamil Can you please test this patch using clean installation. You don't have to even configure the SMTP module. The key thing is the status message should say SMTP when both the YAML form and SMTP module is installed.
Comment #20
jrockowitz commentedUsing simplytest.me I was able to get the2770071-smtp-authentication-02 branch installed with the SMTP module and confirm that the status message has been updated.
Here the simplytest.me site, which is only available for 24 hours.
https://rrlrn.ply.st/admin/reports/status
Comment #21
NYSolutions.com commentedWow, completely uninstalled yamlform again and re-downloaded from the2770071-smtp-authentication-02 branch and I can't believe it, it is working now.
Comment #22
jrockowitz commentedComment #23
kclarkson commentedJust tried downloading the newest stable version of smtp - June 27th.
Sending a test message was fine. But once I tried submitting the message in the form I receive the following error.
Here is the error I am receiving -
Invalid address: You must provide at least one recipient email address. Invalid address: The website encountered an unexpected error. Please try again later.
RuntimeException: Failed to start the session because headers have already been sent
Comment #24
NYSolutions.com commentedIf you go to configuration, SMTP authentication, can you successfully send a test email?
Comment #25
jrockowitz commentedI think this issue might not be related to the YAML form. My patch and solution basically allowed the SMTP module to be used to send email. It is possible the YAML form module is sending incorrectly email values/headers to the SMTP module.
Are you able to to duplicate the error using just the Contact form?
Comment #26
kclarkson commentedThis is the most recent version of core:
-smtp: current stable
-yamlform - 8.x-1.x
Yes I am able to send the test message. Everything looks great with the test and I have also confirmed that the messages are in fact being sent to both the user and the site account.
The only issue now is the error that shows up in the dialogue box after a submission.
Here is the most recent error:
Comment #27
jrockowitz commented> Warning: Invalid argument supplied for foreach() in Drupal\smtp\Plugin\Mail\SMTPMailSystem->mail() (line 404 of modules/smtp/src/Plugin/Mail/SMTPMailSystem.php).
This code is handling file attachments. I am probably passing a bad value to the SMTP module.
Does your form have a file upload?
Can up export your form, remove the emails, and upload it here? Here is video that walks you thru the best way to export a form. https://www.youtube.com/watch?v=ejzx4D0ldl0 Make sure to enable the YAML form devel module.
Comment #29
kle commented@jrockowitz: such great work !
Ok - I ran in the same problem and figured it out:
In EmailYamlFormHandler::getMessage() line 523ff there is
Please add this
otherwise it comes to an error in SMTPMailSystem::mail() in line 438 because $message['params']['attachments'] = FALSE and not an empty array:
Greetings from Cologne
Comment #30
jrockowitz commentedComment #31
jrockowitz commentedIf the attached patch passes all the test, I will just commit it.
Comment #32
jrockowitz commentedFixed! Please download or checkout the latest dev release.
Comment #33
kle commentedThats fast !! - and better than my solution :-)
Maybe its a cache-problem: the patch isnt in latest dev. I grabbed it with "drush dl yamlform --select" and downloaded it as zip. Strange...
Im sure this will work lateron.