I m trying to send mail which contain some data along with embedded view result programmatically. This mail is trigger on submit of webform. Webform ajax property is enable. Due to which it send incorrect url.
Used below code
$view = Views::getView($viewID);
$view->initDisplay();
.....
$vars['result_table'] = $view->buildRenderable('email', $contetxtualFilter);
In twig file
{{ result_table }}
Here output of first page is send in mail correctly but the pagination link has incorrect url.
Ex of incorrect pagination link of Page 1 is - "?_wrapper_format=drupal_ajax&ajax_form=1&page=0"
Ex of correct pagination link of Page 1 is - "www.test.com/productone?page=0"
Do you have any idea, how can I send correct pagination link in email without turning off webform ajax property. So that when user click on pagination in mail he is redirect to specific page.