trackingUrl on MassEmail.php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • item
    Active Community Member
    • Mar 2017
    • 1476

    trackingUrl on MassEmail.php

    Hello,

    I have try many option but with no good result :
    As we can see, optOutLink is clickable (tag html 'a') see code below
    when I insert trackingURL in email template like :
    - {trackingUrl:5c5ffd57d3cc72203}. I obtain in mail a no clickable link.

    when I insert trackingUrl in email template like : link
    test to display : clickMe
    To what URL should this link go?
    {trackingUrl:5c5ffd57d3cc72203}

    the result become in email received :
    link clickable .. but : http//url <= we loose the ":" between http and //
    I have try with https//. same result.

    maybe siteUrl in config must be without https:// ? this is the only think I have not try

    espocrm 5.5.5 and tryed on 2 instance.


    Cheers


    On file line +- 360
    PHP Code:
    
           $optOutUrl = $this->getConfig()->get('siteUrl') . '?entryPoint=unsubscribe&id=' . $queueItem->id;
            $optOutLink = '<a href="'.$optOutUrl.'">'.$this->getLanguage()->translate('Unsubscribe', 'labels', 'Campaign').'</a>';
    
            $body = str_replace('{optOutUrl}', $optOutUrl, $body);
            $body = str_replace('{optOutLink}', $optOutLink, $body);
    
            foreach ($trackingUrlList as $trackingUrl) {
                $url = $this->getConfig()->get('siteUrl') . '?entryPoint=campaignUrl&id=' . $trackingUrl->id . '&queueItemId=' . $queueItem->id;
                $body = str_replace($trackingUrl->get('urlToUse'), $url, $body);
            } 
    

    If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​
  • yuri
    Member
    • Mar 2014
    • 8440

    #2
    Hi,

    You need to modify your template in code view and remove http:// from url.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    Working...