Output file URL to e-mail
-
I’ve found several similar questions but couldn’t find the solution to my problem so I hope someone can help me with this.
I simply want someone to upload a photo of themselves and add the url in between the <img />-tag somewhere in the e-mail that is being sent out.
I’m using the following code to create an [attachment_url] tag which I hope will generate the full url of the attachment so I can use it in between the <img />-tag as mentionedfunction wpcf7_tag_attachment_url($output, $name, $html, $url) { $name = preg_replace('/^wpcf7\./', '_', $name); // for back-compat $submission = WPCF7_Submission::get_instance(); if (! $submission) { return $output; } if ('attachment_url' == $name) { return $url; // Where and how do I get the full URL here? } return $output; } add_filter('wpcf7_special_mail_tags', 'wpcf7_tag_attachment_url', 10, 3);
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.