Your champion, and your solution worked for me to fix my Unsubscribe page not working in my Mautic Docker Container. I noticed a couple of things (and I used EasyPanel to build Mautic v4.4.9 on Ubuntu 22.04 LTS Docker Build) - So I went to the terminal and I entered the config file and found that it said
‘tmp_path’ => ‘/var/www/html/app/…/var/tmp’,
so I changed this to how you reccommended it which, just to clarify for others was
‘tmp_path’ => ‘/var/www/html/var/tmp’,
A quick question for you though @wget do I also need to be concerned about path to cache directory and path to log directory as picture below? I noticed that I changed ‘tmp_path’ => ‘/var/www/html/app/…/var/tmp’, to what you suggested to ‘tmp_path’ => ‘/var/www/html/var/tmp’, and that those have very similar file structure…
For those that want an easy tutorial on how to fix this please see below…
This is how it now looks in my terminal right near the top of the file
PS - to get to this file you are going to have to be in root - it would not allow me even with a non root user that had sudo priviliges, just ask ai and it will help you get to your file but my structure looked like this (in EasyPanel anyways)
root@srv557064:/etc/easypanel/projects/clientsprojectname/mautic/volumes/mautic_data/app/config# nano local.php
So after this, my unsubscribe page finally worked, I am guessing that is because of what you are talking about in regards to the tmp_path key and those users having a temporary access key or something to see their custom landing page for unsubscribe… for anyone else that wants a nice unsubscribe email template, here is the code for it below that works with the {unsubscribe_text} at the bottom of your emails, you need to put this in Configuration → Email Settings → Unsubscribed confirmation message Section
here is the code for that if you want to put in Configuration>Email Settings>Unsubscribed confirmation message
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Unsubscribed</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.container {
background-color: white;
padding: 40px;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
text-align: center;
max-width: 400px;
}
h1 {
color: #4a4a4a;
margin-bottom: 20px;
}
p {
color: #666;
line-height: 1.6;
}
.emoji {
font-size: 48px;
margin-bottom: 20px;
}
.button {
display: inline-block;
padding: 10px 20px;
background-color: #3498db;
color: white;
text-decoration: none;
border-radius: 5px;
transition: background-color 0.3s ease;
}
.button:hover {
background-color: #2980b9;
}
</style>
</head>
<body>
<div class="container">
<div class="emoji">👋</div>
<p>We are sorry to see you go! |EMAIL| will no longer receive emails from us.</p>
<p>If this was by mistake, <a href="|URL|" class="button">click here to re-subscribe</a>.</p>
<p>If you ever change your mind, feel free to email us back!</p>
</div>
</body>
</html>