News:

Support the VirtueMart project and become a member

Main Menu

Add BCC to vm3 USER confirmation email

Started by ingmardevos, October 24, 2016, 12:23:51 PM

Previous topic - Next topic

ingmardevos

Hi!
For integration with a feedback solution I need to add a BCC field (to a set address) to the user order confirmation.

Does anyone have any idea how to do this, and where to look?

Setting a different confirmation address for vendor, and then forwarding that email address to 2 different e-mail addresses obviously doesn't have the same effect.
It has to be a BCC from the user mail because the recipient of the BCC has to see to which e-mail the original e-mail was sent (the user's email).

Hope someone has a solution for this!

Thanks

kishoreonwork

Hello ,

You need to edit components\com_virtuemart\helpers\shopfunctionsf.php file  line no 707

try {
$return = $mailer->Send();
}
catch (Exception $e)
{
VmConfig::$logDebug = true;
vmdebug('Error sending mail ',$e);
vmError('Error sending mail ');
// this will take care of the error message
return false;
}



with


try {        $mailer->addBCC("blindcopy@yourdomain.com");
$return = $mailer->Send();
}
catch (Exception $e)
{
VmConfig::$logDebug = true;
vmdebug('Error sending mail ',$e);
vmError('Error sending mail ');
// this will take care of the error message
return false;
}



Replace blindcopy@yourdomain.com with your email
Thanks
Kishore
I am available for paid joomla and virtuemart consulting.
http://www.kishoreweblabs.com/
skype kishore2607

ingmardevos

Hi Kishore,

Thank you so much for providing this solution!
It works perfect in VM 3.0.18.

I also tried it on an older site, VM 3.0.14, the shopfunctionsf file is different there. So for people looking for this line of code, make sure you're on the latest version.

Thanks again :-)

Ingmar

kishoreonwork

I am glad it works for you. Now marking this post solved.

Thanks
Kishore
I am available for paid joomla and virtuemart consulting.
http://www.kishoreweblabs.com/
skype kishore2607

kontozastepcze

Hi, can I use BCC from Shopper Field value, can I get, for example, a shopper secondary email from the custom shopper field?
I wonder how to get that value at this level shopfunctionsf.php.

Thank you