-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hostname hardcoded #19
Comments
Hi, did it not automatically detect .test at your end ? very strange Can I ask you a question : Thanks for reporting it |
it did not, its hard coded in the code.
and replaced the '.local' with $local_domain
The domains where listing, just the links where all to .local |
$admin.link --> lines 951, 956, 961, 971, 976, 981 and 992 should be changed too to .test to have this all done for you smoothly |
thanks. Also check the email page that's also go a D: drive hard link |
for open_email.php I can think for this for now: <?php
// Define potential paths
$emailFilePaths = [
'C:/laragon/bin/sendmail/output/',
'D:/laragon/bin/sendmail/output/'
];
function findEmailFile($filename, $paths) {
foreach ($paths as $path) {
$filePath = rtrim($path, '/') . '/' . basename($filename);
if (file_exists($filePath)) {
return $filePath;
}
}
return false;
}
if (isset($_GET['email'])) {
$emailFile = findEmailFile($_GET['email'], $emailFilePaths);
if ($emailFile) {
$content = file_get_contents($emailFile);
if ($content === false) {
echo "Error reading email file.";
} else {
// Decode and display content as HTML
$decodedContent = htmlspecialchars_decode($content, ENT_QUOTES);
echo nl2br($decodedContent);
}
} else {
echo "Email not found.";
}
} else {
echo "No email specified.";
}
?> |
Date: 2024-06-05 Changes: Dynamic Email File Path Detection in open_email.php: Issue: Hardcoded file path to the D: drive for email files caused issues for users with different drive setups. Fix: Introduced a function to dynamically check both C:/laragon/bin/sendmail/output/ and D:/laragon/bin/sendmail/output/ directories. The script now searches both paths and reads the email file from whichever path it finds the file. Code Change: Added function findEmailFile to check both potential paths. Updated logic to call this function and fetch the email file dynamically. Dynamic Host Template in index.php: Issue: Hardcoded .local domain suffix caused issues for users with different local domain suffixes like .test. Fix: Introduced a configuration option to set the domain suffix dynamically. This allows the dashboard to adapt to different environments without hardcoding the domain suffix. Code Change: Replaced hardcoded .local with a configurable variable $domainSuffix. Updated all relevant parts of the code to use this variable for generating URLs. Bug Fixes: GitHub Issue #19: Fixed the hardcoded D: drive issue in open_email.php as reported by a user. Domain Suffix Configuration: Resolved issues related to hardcoded .local domain suffix in the dashboard. Contributors: Tarek Tarabichi Community feedback from GitHub @martic Issue #19
Changes pushed for version 2.3.5 thanks for the report! |
Issue closed for now ! |
I use .test as my local domain.
Can you get the configured domain from the Preferences:
The text was updated successfully, but these errors were encountered: