0

We set up the mautic box with external accessible name http://email.mysite.com, the internal hostname of the box is internal.box.cm

During mautic installation process we set up site_url=email.mysite.com but when emails are send the the urls inside of email are tracked using internal.box.cm instead of email.mysite.com.

I was looking thru documentation, could not find anywhere how to make this work correctly. Is there anyway to fix this, without changing mautic code?

Stephan
  • 41,764
  • 65
  • 238
  • 329
usearch
  • 65
  • 1
  • 13

2 Answers2

0

I'm not sure what a box is in your question, but Mautic will build the URLs in emails based on the URL you run the Mautic administration from, so be sure to run it from email.mysite.com if you want the links to lead to email.mysite.com.

If Mautic sends emails from a background job, it doesn't know the base URL of Mautic so it reads it from the configuration, the site_url param. Be aware that if you change a param directly in a config file (app/config/local.php in this case), you have to clear the Mautic cache to apply the change.

John Linhart
  • 1,746
  • 19
  • 23
  • Is there way to make thru hook or some other way always use app/config/local.php site_url instead of where it runs from? – usearch Jul 27 '16 at 22:26
0

Not sure if you got this fixed or not, but I was having the exact same problem when manually sending an email to a contact from the mautic web interface. I tried creating a new VM for it from scratch and then realized that if I was accessing the dashboard using the server's lan ip (e.g. 192.167.1.5), then that's the ip that showed up in the links in the emails that got sent out. However, if I accessed the dashboard using the hostname.domain, then the hostname.domain would show up in the links in the email. I'm not sure why mautic wouldn't use the base url that it's programmed to use in the dashboard.

J-a-n-u-s
  • 1,469
  • 17
  • 20
  • I had a related problem with the base URL being wrong and turns out the default file specified in the Site URL of General Settings needed to be removed (default: http://domain.com/index.php -> is now: http://domain.com). This was causing the wrong url to be used for the avatar.png and some other images. https://www.mautic.org/community/index.php/2753-avatar-cannot-edit-and-404/p1#p13157 – J-a-n-u-s Feb 27 '17 at 02:32