Closed (fixed)
Project:
Webform
Version:
7.x-4.0-beta1
Component:
Code
Priority:
Minor
Category:
Support request
Assigned:
Reporter:
Created:
19 Oct 2013 at 13:37 UTC
Updated:
3 Mar 2014 at 06:50 UTC
Jump to comment: Most recent
Hello, I need a little help please.
I want a webform to be automatically resended via mail, just like when it was submitted.
The involved function I think is "webform_submission_send_mail( $node , $submission );"
the $node parameter is fixed at 178 and the $submission (=sid??) is in a variable called $sid.
I got this error:
Warning: Invalid argument supplied for foreach() in /sites/all/modules/webform/includes/webform.submissions.inc on line 186
Here's the code:
$submission = webform_get_submission(178, $sid);
webform_submission_send_mail(178, $submission);
Can someone help me?
thanks
Comments
Comment #0.0
JFast commentedtypo
Comment #0.1
JFast commentedtypo
Comment #0.2
JFast commentedcode
Comment #0.3
JFast commentedcode
Comment #1
quicksketchYou can already do this in the UI by viewing a submission, then there is a "Resend e-mails" link at the top of the page.
I don't normally help with custom coding questions in the Webform queue, but your code is really close:
It should be: