User blog comment:Kirkburn/Technical Update: April 27, 2015/@comment-452-20150427203902/@comment-452-20150430054549

Thanks for the update.

I'm unsure when exactly the urls are converted to sendgrid urls, but something like this might work: protected function bodyHtmlToText( $html ) { $pattern = '/(.+)?<\/a>/'; $replacement = '$2 $1'; $html = preg_replace($pattern, $replacement, $html); $bodyText = strip_tags( $html ); But, if the urls are switched before bodyHtmlToText is called, this obviously wouldn't work.

This is how I was planning on replacing them in my emails, until I discovered the problem with the URLs.

Obviously, the regex might need some tweaking, I only tested it once, then scrapped it since the URLs were too long.