When you try to resend the email of a submission, and check an email address that is disabled for sending in the general email settings of the webform, and there is no other address to which an email is succesfully sent, you get the error message "No e-mails were able to be sent due to a server error." This is very confusing, as there was no server error.
From comment:
After looking at the code, it seems there may be something not working properly.
webform.submissions.inc
function webform_submission_resend_submit()
...
$sent_count = webform_submission_send_mail($node, $submission, $emails, TRUE);
The TRUE
in the code above is for the parameter $send_disabled
. This parameter is supposed to ensure emails are sent, even if disabled. This obviously isn't working here if we are seeing the error message about no emails being sent.
Comment | File | Size | Author |
---|
Comments
Comment #2
JoshaHubbers CreditAttribution: JoshaHubbers at ezCompany commentedThis patch only shows email addresses that have the "sending" option enabled. Else the default message "Sending is not enabled for this form" is displayed.
Comment #3
JoshaHubbers CreditAttribution: JoshaHubbers at ezCompany commentedComment #4
JoshaHubbers CreditAttribution: JoshaHubbers at iO commentedOops, fixed indenting.
Comment #5
Liam MorlandPlease check your coding standards. No need to remove the type declaration.
Comment #6
solideogloria CreditAttribution: solideogloria commentedIn my opinion, it'd be better to send the emails to the selected recipients, regardless of whether the emails are disabled. This is because the enabled/disabled values were shown to the user as the defaults already when they opened the resend emails window, and the user explicitly selected to send to those recipients.
Comment #7
Liam MorlandYes, if someone specifically requests that an email be sent, it should be set regardless of the setting. This issue is about the error message so we need to be sure any solution has good messages.
Comment #8
solideogloria CreditAttribution: solideogloria commentedAfter looking at the code, it seems there may be something not working properly.
webform.submissions.inc
The
TRUE
in the code above is for the parameter$send_disabled
. This parameter is supposed to ensure emails are sent, even if disabled. This obviously isn't working here if we are seeing the error message about no emails being sent.Comment #9
solideogloria CreditAttribution: solideogloria commentedComment #10
solideogloria CreditAttribution: solideogloria commentedComment #11
solideogloria CreditAttribution: solideogloria commentedComment #12
solideogloria CreditAttribution: solideogloria commentedThis is already fixed in the latest version of the module. Make sure you are using the latest version.
Fixed here: #2893192: Webform not resending email previously unselected