Hello,
This is a manual fix/solution for a bug which is to be removed soon, however until it remains here's how to fix it:
PROBLEM: Emails sent by the system show 'support@bosscart.com' as the sender email, and admin email full set up.
** DIFFICULTY LEVEL: MODERATE **
SHORT SOLUTION:
Basically you need to go through these 4 files:
and change any instance of such code:HTML Code:bosscart/ipn.php bosscart/core/modules/velnet.module.checkout.class.php bosscart/core/modules/velnet.module.register.class.php bosscart/core/modules/velnet.module.password.class.php
to:PHP Code:$headers .= "From: system@bosscart.com\r\n";
assuming 'admin@yourdomain.com' is your admin email (or the email you want to show in FROM field.PHP Code:$headers .= "From: admin@yourdomain.com\r\n";
Also change such code:
to:PHP Code:mail("sushil@xponse.com", "IN Pending", "$sql", $headers);
and such:PHP Code:mail(admin@yourdomain.com", "IN Pending", "$sql", $headers);
to:PHP Code:$adminEmail = 'sushil@xponse.com';
again assuming 'admin@yourdomain.com' is your admin email you want to RECEIVE emails from users and system notifications.PHP Code:$adminEmail = 'admin@yourdomain.com';
DETAILED SOLUTION:
There are four files to be modified, let's go through them one by one.
We assume that your admin email you want the system to put in FROM field is 'admin@yourdomain.com', and the email you want to receive the system notices and emails from users is 'receive@yourdomain.com' (although it can be the same one).
HTML Code:bosscart/ipn.php
1. Open the file in any text editor (one that shows line numbers and colours the commands would be nice, Notepad++ is a free and a good one)
Find this code around lines 39-40:
replace it with:PHP Code:$headers .= "From: system@bosscart.com\r\n";
mail("sushil@xponse.com", "IN Pending", "$sql", $headers);
Find this code around lines 127-128:PHP Code:$headers .= "From: admin@yourdomain.com\r\n";
mail("receive@yourdomain.com", "IN Pending", "$sql", $headers);
replace it with:PHP Code:$headers .= 'Content-type: text/html; charset=iso-8859-1\r\n';
$headers .= 'From: system@bosscart.com\r\n';
Lines 136-137:PHP Code:$headers .= 'Content-type: text/html; charset=iso-8859-1\r\n';
$headers .= 'From: admin@yourdomain.com\r\n';
replace it with:PHP Code:$adminEmail = 'sushil@xponse.com';
$subject = 'New Order';
Line 156:PHP Code:$adminEmail = 'receive@yourdomain.com';
$subject = 'New Order';
replace with:PHP Code:$headers .= "From: support@bosscart.com\r\n";
Now please SAVE the changes in the file, upload it back to the server and OVERWRITE the old one.PHP Code:$headers .= "From: admin@yourdomain.com\r\n";
2. File:Lines 555-556:HTML Code:bosscart/core/modules/velnet.module.checkout.class.php
replace with:PHP Code:$headers .= "Content-type: ".$usr_data['email_type']."; charset=iso-8859-1\n";
$headers .= "From:support@bosscart.com\n";
Now please SAVE the changes in the file, upload it back to the server and OVERWRITE the old one.PHP Code:$headers .= "Content-type: ".$usr_data['email_type']."; charset=iso-8859-1\n";
$headers .= "From:admin@yourdomain.com\n";
3. File:Lines 179-180:HTML Code:bosscart/core/modules/velnet.module.register.class.php
replace with:PHP Code:$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From:support@bosscart.com\r\n";
Lines 248-249:PHP Code:$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From:admin@yourdomain.com\r\n";
replace with:PHP Code:$headers .= "From:support@bosscart.com\n";
@mail('sushil@xponse.com',$subject, $mail_body, $headers);
Now please SAVE the changes in the file, upload it back to the server and OVERWRITE the old one.PHP Code:$headers .= "From:admin@yourdomain.com\n";
@mail('receive@yourdomain.com',$subject, $mail_body, $headers);
4. File:Lines 56-57:HTML Code:bosscart/core/modules/velnet.module.password.class.php
replace with:PHP Code:$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "From:support@bosscart.com\n";
Now please SAVE the changes in the file, upload it back to the server and OVERWRITE the old one.PHP Code:$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "From:admin@yourdomain.com\n";
That is it! Well done!
Thank you,
Piotrek
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks