DirectAdmin users with SitePanel2 email issue?

Andrax

Verified User
Joined
Oct 6, 2003
Messages
36
Location
[r o o t]
Greetings all.

I've been shopping around for a helpdesk and found one that I am quite impressed with. SitePanel2 does everything I want/need and is very reasonably priced.

However, I ran into a snag with the free trial that I have been working on with the author of this software. The problem is that the desk will NOT send mail properly. Well, wont send it at all.

I asked for a bit more detail about what he found (very prompt support in this matter btw from the SitePanel folks).

Basically your sendmail configuration does not seem to like the headers used by SitePanel 2 when sending emails. I tried sending an email via PHP's mail() function using only the From header and it was sent correctly. Here is a section of code from SitePanel illustrating the headers used:

$headers = "";
$headers .= "From: $admin_emailn";
$headers .= "X-Sender: $admin_email<$admin_title>\\n";
$headers .= "X-Mailer: PHP4 SitePanel 2\\n";
$headers .= "X-Priority: 3\\n";
$headers .= "Return-Path: <$admin_email>\\n";
$headers .= "Mime-Version: 1.0\\n";
$headers .= "Content-Type: text/html; charset="ISO-8859-1"\\n";
$headers .= "Content-Transfer-Encoding: 8bit\\n";

mail("$email","$do_subject","$admin_messagesend","$headers");

Note that the \\n used above should be a single escape character followed by n, not 2 as shown.

This is all apparently hardcoded into the system, and while he has offered to try to modify the calls on a future update, I thought I would come over here and see if anyone knew why this is happening and better yet, how to possibly get it to work in the meantime so I don't have to wait a month or two for the update. :D
 
PHP:
$headers = ""; 
$headers .= "From: $admin_emailn"; 
$headers .= "X-Sender: $admin_email<$admin_title>\\\n"; 
$headers .= "X-Mailer: PHP4 SitePanel 2\\\n";
$headers .= "X-Priority: 3\\\n"; 
$headers .= "Return-Path: <$admin_email>\\\n"; 
$headers .= "Mime-Version: 1.0\\\n";
$headers .= "Content-Type: text/html; charset="ISO-8859-1"\\\n";
$headers .= "Content-Transfer-Encoding: 8bit\\\n";

mail("$email","$do_subject","$admin_messagesend","$headers");

This code looks ok ;) why then use 2 slashes I don't know better would be:

PHP:
$headers = ""; 
$headers .= "From: $admin_email\n"; 
$headers .= "X-Sender: $admin_email<$admin_title>\n"; 
$headers .= "X-Mailer: PHP4 SitePanel 2\n";
$headers .= "X-Priority: 3\n"; 
$headers .= "Return-Path: <$admin_email>\n"; 
$headers .= "Mime-Version: 1.0\n";
$headers .= "Content-Type: text/html; charset=\"ISO-8859-1\"\n";
$headers .= "Content-Transfer-Encoding: 8bit\n";

mail("$email","$do_subject","$admin_messagesend","$headers");

Especialy because for the content type they use " " quotes without escaping them ;) That should result in a parse error :p

Could be a type in copy/pase :p
 
Last edited:
Back
Top