[Skip to main content](#vessel-content)

#   Send confirmation mail to linked other adresses

##

- **[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")**
- [![Squashtoppertje's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile") Topic Author
- [ Offline](/forum/user/39506-squashtoppertje)

Less More

- Posts: 45
- Thank you received: 0
-
-

11 years 1 day ago -  11 years 1 day ago [\#220059](#220059) by [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")  *[Send confirmation mail to linked other adresses](/forum/31-development/880364-send-confirmation-mail-to-linked-other-adresses#220059 "-- HikaShop version -- : 2.6.0 Business -- Joomla version -- : 3.4.1  Hi,  I need to get the following done. When a (b2b) customer orders products and gets a confirmation email, I also need to send that email(copy) to his account manager. What makes it more difficult is that different customers have different account managers. So I can not just add an address in the BCC field.  I want to add the emailadress and name of the account manager to the database. This could be the case: Customer 1 orders &gt; copy confirmation to email Account Manager A Customer 2 orders &gt; copy confirmation to email Account Manager A Customer 3 orders &gt; copy confirmation to email Account Manager B Etc.  Do you have some tips how to get this done?  Thanks very much!  EDIT: , but that didn't do the trick for me.")* was created by *[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")*

-- HikaShop version -- : 2.6.0 Business
-- Joomla version -- : 3.4.1

Hi,

I need to get the following done. When a (b2b) customer orders products and gets a confirmation email, I also need to send that email(copy) to his account manager. What makes it more difficult is that different customers have different account managers. So I can not just add an address in the BCC field.

I want to add the emailadress and name of the account manager to the database. This could be the case:
Customer 1 orders &gt; copy confirmation to email Account Manager A
Customer 2 orders &gt; copy confirmation to email Account Manager A
Customer 3 orders &gt; copy confirmation to email Account Manager **B**
Etc.

Do you have some tips how to get this done?

Thanks very much!

EDIT: [ I checked out this thread](http://www.hikashop.com/forum/4-how-to/23622-send-order-status-notification-to-multiple-people.html?start=20), but that didn't do the trick for me.

Last edit: 11 years 1 day ago by [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile"). Reason: Added link

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MDM2NC1zZW5kLWNvbmZpcm1hdGlvbi1tYWlsLXRvLWxpbmtlZC1vdGhlci1hZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 1 day ago [\#220106](#220106) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Send confirmation mail to linked other adresses](/forum/31-development/880364-send-confirmation-mail-to-linked-other-adresses#220106 "-- HikaShop version -- : 2.6.0 Business -- Joomla version -- : 3.4.1  Hi,  I need to get the following done. When a (b2b) customer orders products and gets a confirmation email, I also need to send that email(copy) to his account manager. What makes it more difficult is that different customers have different account managers. So I can not just add an address in the BCC field.  I want to add the emailadress and name of the account manager to the database. This could be the case: Customer 1 orders &gt; copy confirmation to email Account Manager A Customer 2 orders &gt; copy confirmation to email Account Manager A Customer 3 orders &gt; copy confirmation to email Account Manager B Etc.  Do you have some tips how to get this done?  Thanks very much!  EDIT: , but that didn't do the trick for me.")*

Hi,

You can create a custom address field, display it or not in the frontend, fill its value and use this kind of code at the end of the preload part of the desired emails:
Code:

if(!empty($data-&gt;cart-&gt;customfield_name)){ $this-&gt;mailer-&gt;addBCC($data-&gt;cart-&gt;customfield_name);

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MDM2NC1zZW5kLWNvbmZpcm1hdGlvbi1tYWlsLXRvLWxpbmtlZC1vdGhlci1hZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")**
- [![Squashtoppertje's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile") Topic Author
- [ Offline](/forum/user/39506-squashtoppertje)

Less More

- Posts: 45
- Thank you received: 0
-
-

11 years 21 hours ago [\#220175](#220175) by [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")  Replied by *[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")* on topic *[Send confirmation mail to linked other adresses](/forum/31-development/880364-send-confirmation-mail-to-linked-other-adresses#220175 "-- HikaShop version -- : 2.6.0 Business -- Joomla version -- : 3.4.1  Hi,  I need to get the following done. When a (b2b) customer orders products and gets a confirmation email, I also need to send that email(copy) to his account manager. What makes it more difficult is that different customers have different account managers. So I can not just add an address in the BCC field.  I want to add the emailadress and name of the account manager to the database. This could be the case: Customer 1 orders &gt; copy confirmation to email Account Manager A Customer 2 orders &gt; copy confirmation to email Account Manager A Customer 3 orders &gt; copy confirmation to email Account Manager B Etc.  Do you have some tips how to get this done?  Thanks very much!  EDIT: , but that didn't do the trick for me.")*

Thanks. How can I fill the (variable) value of the custom address field? Use some field type?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MDM2NC1zZW5kLWNvbmZpcm1hdGlvbi1tYWlsLXRvLWxpbmtlZC1vdGhlci1hZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14296
-
-

11 years 13 hours ago [\#220178](#220178) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Send confirmation mail to linked other adresses](/forum/31-development/880364-send-confirmation-mail-to-linked-other-adresses#220178 "-- HikaShop version -- : 2.6.0 Business -- Joomla version -- : 3.4.1  Hi,  I need to get the following done. When a (b2b) customer orders products and gets a confirmation email, I also need to send that email(copy) to his account manager. What makes it more difficult is that different customers have different account managers. So I can not just add an address in the BCC field.  I want to add the emailadress and name of the account manager to the database. This could be the case: Customer 1 orders &gt; copy confirmation to email Account Manager A Customer 2 orders &gt; copy confirmation to email Account Manager A Customer 3 orders &gt; copy confirmation to email Account Manager B Etc.  Do you have some tips how to get this done?  Thanks very much!  EDIT: , but that didn't do the trick for me.")*

Hi,

What custom address field ? Could you give more background on what you're talking about ?
How did you configure your custom field ? Could you do a screenshot ?
What you do enter in it for example ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MDM2NC1zZW5kLWNvbmZpcm1hdGlvbi1tYWlsLXRvLWxpbmtlZC1vdGhlci1hZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")**
- [![Squashtoppertje's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile") Topic Author
- [ Offline](/forum/user/39506-squashtoppertje)

Less More

- Posts: 45
- Thank you received: 0
-
-

11 years 7 hours ago [\#220212](#220212) by [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")  Replied by *[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")* on topic *[Send confirmation mail to linked other adresses](/forum/31-development/880364-send-confirmation-mail-to-linked-other-adresses#220212 "-- HikaShop version -- : 2.6.0 Business -- Joomla version -- : 3.4.1  Hi,  I need to get the following done. When a (b2b) customer orders products and gets a confirmation email, I also need to send that email(copy) to his account manager. What makes it more difficult is that different customers have different account managers. So I can not just add an address in the BCC field.  I want to add the emailadress and name of the account manager to the database. This could be the case: Customer 1 orders &gt; copy confirmation to email Account Manager A Customer 2 orders &gt; copy confirmation to email Account Manager A Customer 3 orders &gt; copy confirmation to email Account Manager B Etc.  Do you have some tips how to get this done?  Thanks very much!  EDIT: , but that didn't do the trick for me.")*

Hi Nicolas,

Well, I'm responding to the reaction of Xavier. He suggests to use a custom address field for my original question. But his answer is not clear (enough) for me.

This is what I like to accomplish:
When a (b2b) customer orders products and gets a confirmation email, I also need to send that email(copy) to his account manager. What makes it more difficult is that different customers have different account managers. So I can not just add an address in the BCC field.

I want to add the emailadress and name of the account manager to the database. This could be the case:
Customer 1 orders &gt; copy confirmation to email Account Manager A
Customer 2 orders &gt; copy confirmation to email Account Manager A
Customer 3 orders &gt; copy confirmation to email Account Manager B
Etc.

Thanks for your support.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MDM2NC1zZW5kLWNvbmZpcm1hdGlvbi1tYWlsLXRvLWxpbmtlZC1vdGhlci1hZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26395
- Thank you received: 4077
-
- [](http://obsi.dev)
-

10 years 11 months ago [\#220288](#220288) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Send confirmation mail to linked other adresses](/forum/31-development/880364-send-confirmation-mail-to-linked-other-adresses#220288 "-- HikaShop version -- : 2.6.0 Business -- Joomla version -- : 3.4.1  Hi,  I need to get the following done. When a (b2b) customer orders products and gets a confirmation email, I also need to send that email(copy) to his account manager. What makes it more difficult is that different customers have different account managers. So I can not just add an address in the BCC field.  I want to add the emailadress and name of the account manager to the database. This could be the case: Customer 1 orders &gt; copy confirmation to email Account Manager A Customer 2 orders &gt; copy confirmation to email Account Manager A Customer 3 orders &gt; copy confirmation to email Account Manager B Etc.  Do you have some tips how to get this done?  Thanks very much!  EDIT: , but that didn't do the trick for me.")*

Hi,

Why did you copy paste the content of your first message ?

Xavier told you to use an address custom field : but you can also use a "user custom field".
And because you want to store an email address ; I think that using a "text" will be just fine for the custom field type.
You can also use a dropdown and enter the different account managers ; it's up to you !

Now ; here the documentation for the custom fields :
[ www.hikashop.com/support/documentation/i...shop-field-form.html](http://www.hikashop.com/support/documentation/integrated-documentation/10-hikashop/42-hikashop-field-form.html)

Once you will know how you want your thing ; you'll decide which type of which kind of custom field you want to use.
If you have issues for the configuration or the email modification ; in that case you can reply to that thread and provide details about what you have already done.

But you asked how you could make that "BCC" address dynamic and Xavier gave you one solution.
I'm sorry if it was not clear enough for you but the solution was there ; and there is no need to asked once again the same question.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MDM2NC1zZW5kLWNvbmZpcm1hdGlvbi1tYWlsLXRvLWxpbmtlZC1vdGhlci1hZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")**
- [![Squashtoppertje's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile") Topic Author
- [ Offline](/forum/user/39506-squashtoppertje)

Less More

- Posts: 45
- Thank you received: 0
-
-

10 years 11 months ago [\#220354](#220354) by [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")  Replied by *[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")* on topic *[Send confirmation mail to linked other adresses](/forum/31-development/880364-send-confirmation-mail-to-linked-other-adresses#220354 "-- HikaShop version -- : 2.6.0 Business -- Joomla version -- : 3.4.1  Hi,  I need to get the following done. When a (b2b) customer orders products and gets a confirmation email, I also need to send that email(copy) to his account manager. What makes it more difficult is that different customers have different account managers. So I can not just add an address in the BCC field.  I want to add the emailadress and name of the account manager to the database. This could be the case: Customer 1 orders &gt; copy confirmation to email Account Manager A Customer 2 orders &gt; copy confirmation to email Account Manager A Customer 3 orders &gt; copy confirmation to email Account Manager B Etc.  Do you have some tips how to get this done?  Thanks very much!  EDIT: , but that didn't do the trick for me.")*

Hi Jerome,

I'm sorry, but I think this is a miss communication... Xavier did give me start, but unfortunately it was not completely clear to me. I gave the same information again because it seemed like Nicolas needed it.

But the point is that I do not want the customer to select his Account Manager. The system needs to do this without the customer seeing it. So I have to do some scripting to make it able to send the copy to the right account manager. The customers are in customer groups so I wanted to use this.

I'm thinking something like, in words, not code:
If customer = in customergroup A then BCC AM1@example.com;
if customer = in customergroup B then BCC AM2@example.com.
etc.

But I hope for some code to get me started and it was not clear to me where in the custom (address?) fields to place it.

Thanks again.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MDM2NC1zZW5kLWNvbmZpcm1hdGlvbi1tYWlsLXRvLWxpbmtlZC1vdGhlci1hZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14296
-
-

10 years 11 months ago [\#220359](#220359) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Send confirmation mail to linked other adresses](/forum/31-development/880364-send-confirmation-mail-to-linked-other-adresses#220359 "-- HikaShop version -- : 2.6.0 Business -- Joomla version -- : 3.4.1  Hi,  I need to get the following done. When a (b2b) customer orders products and gets a confirmation email, I also need to send that email(copy) to his account manager. What makes it more difficult is that different customers have different account managers. So I can not just add an address in the BCC field.  I want to add the emailadress and name of the account manager to the database. This could be the case: Customer 1 orders &gt; copy confirmation to email Account Manager A Customer 2 orders &gt; copy confirmation to email Account Manager A Customer 3 orders &gt; copy confirmation to email Account Manager B Etc.  Do you have some tips how to get this done?  Thanks very much!  EDIT: , but that didn't do the trick for me.")*

Hi,

Then based on what you say you want to do, there is no need to talk about custom fields.
The line you need is this:
$this-&gt;mailer-&gt;addBCC('AM1@example.com');

Then, you can add additional code around it to check the user group of the customer.
You'll find many resources online for that since it's not something related to HikaShop but Joomla. For example:
[ forum.joomla.org/viewtopic.php?t=530721](http://forum.joomla.org/viewtopic.php?t=530721)

So for example: &lt;?php
jimport( 'joomla.access.access' );
$groups = JAccess::getGroupsByUser($data-&gt;cart-&gt;customer-&gt;user_cms_id);
if(in_array(18,$groups)) $this-&gt;mailer-&gt;addBCC('AM1@example.com'); ?&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MDM2NC1zZW5kLWNvbmZpcm1hdGlvbi1tYWlsLXRvLWxpbmtlZC1vdGhlci1hZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")**
- [![Squashtoppertje's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile") Topic Author
- [ Offline](/forum/user/39506-squashtoppertje)

Less More

- Posts: 45
- Thank you received: 0
-
-

10 years 11 months ago -  10 years 11 months ago [\#220596](#220596) by [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")  Replied by *[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")* on topic *[Send confirmation mail to linked other adresses](/forum/31-development/880364-send-confirmation-mail-to-linked-other-adresses#220596 "-- HikaShop version -- : 2.6.0 Business -- Joomla version -- : 3.4.1  Hi,  I need to get the following done. When a (b2b) customer orders products and gets a confirmation email, I also need to send that email(copy) to his account manager. What makes it more difficult is that different customers have different account managers. So I can not just add an address in the BCC field.  I want to add the emailadress and name of the account manager to the database. This could be the case: Customer 1 orders &gt; copy confirmation to email Account Manager A Customer 2 orders &gt; copy confirmation to email Account Manager A Customer 3 orders &gt; copy confirmation to email Account Manager B Etc.  Do you have some tips how to get this done?  Thanks very much!  EDIT: , but that didn't do the trick for me.")*

Hi,

Well, I thought this over and decided to go for the solution Xavier provided after all. However, this does not seem to work.

What I did to test it was the following:
1. I added two custom fields, one addres field and one user field.
2. For a customer I filled these fields with an emailadres.
3. I added the code Xavier gave to the preload screen of the creation notification email.
4. Tested it, but no bcc mail was send (regular emails were send).

I added this code to the preload version: Code:

if(!empty($data-&gt;cart-&gt;emailusercustom)){ $this-&gt;mail-&gt;addBCC($data-&gt;cart-&gt;emailusercustom); } if(!empty($data-&gt;cart-&gt;emailaddresscustom)){ $this-&gt;mail-&gt;addBCC($data-&gt;cart-&gt;emailaddresscustom); } // Just to test: $this-&gt;mailer-&gt;addBCC('example@test.com');

I added the last line to see if this was beeing send, but this didn't happen. FYI: if I enter a global bcc email address in the settings of the email, this is beeing send. So it's not that the server doesn't allow it.

How can I get this to work?

Thanks!

Last edit: 10 years 11 months ago by [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MDM2NC1zZW5kLWNvbmZpcm1hdGlvbi1tYWlsLXRvLWxpbmtlZC1vdGhlci1hZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14296
-
-

10 years 11 months ago [\#220638](#220638) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Send confirmation mail to linked other adresses](/forum/31-development/880364-send-confirmation-mail-to-linked-other-adresses#220638 "-- HikaShop version -- : 2.6.0 Business -- Joomla version -- : 3.4.1  Hi,  I need to get the following done. When a (b2b) customer orders products and gets a confirmation email, I also need to send that email(copy) to his account manager. What makes it more difficult is that different customers have different account managers. So I can not just add an address in the BCC field.  I want to add the emailadress and name of the account manager to the database. This could be the case: Customer 1 orders &gt; copy confirmation to email Account Manager A Customer 2 orders &gt; copy confirmation to email Account Manager A Customer 3 orders &gt; copy confirmation to email Account Manager B Etc.  Do you have some tips how to get this done?  Thanks very much!  EDIT: , but that didn't do the trick for me.")*

Hi,

This code from Xavier would only work if your custom field was of the table "order" (meaning that the customer would fill it during the checkout).

For custom user fields, you want to use such variable $data-&gt;customer-&gt;emailusercustom instead of $data-&gt;cart-&gt;emailusercustom

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MDM2NC1zZW5kLWNvbmZpcm1hdGlvbi1tYWlsLXRvLWxpbmtlZC1vdGhlci1hZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")**
- [![Squashtoppertje's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile") Topic Author
- [ Offline](/forum/user/39506-squashtoppertje)

Less More

- Posts: 45
- Thank you received: 0
-
-

10 years 11 months ago [\#220666](#220666) by [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")  Replied by *[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")* on topic *[Send confirmation mail to linked other adresses](/forum/31-development/880364-send-confirmation-mail-to-linked-other-adresses#220666 "-- HikaShop version -- : 2.6.0 Business -- Joomla version -- : 3.4.1  Hi,  I need to get the following done. When a (b2b) customer orders products and gets a confirmation email, I also need to send that email(copy) to his account manager. What makes it more difficult is that different customers have different account managers. So I can not just add an address in the BCC field.  I want to add the emailadress and name of the account manager to the database. This could be the case: Customer 1 orders &gt; copy confirmation to email Account Manager A Customer 2 orders &gt; copy confirmation to email Account Manager A Customer 3 orders &gt; copy confirmation to email Account Manager B Etc.  Do you have some tips how to get this done?  Thanks very much!  EDIT: , but that didn't do the trick for me.")*

Hmmm, this doesn't work either.

Don't know if your code is wrong, but like said in my previous mail this code does not seem to work:
$this-&gt;mailer-&gt;addBCC('AM1@example.com');

I have tested it to see if I got mail this way, but this did not happen. I put it in the preload-screen, at the end.

Are you sure this is right? Is there maybe another code to try, I really need this to work?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MDM2NC1zZW5kLWNvbmZpcm1hdGlvbi1tYWlsLXRvLWxpbmtlZC1vdGhlci1hZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")**
- [![Squashtoppertje's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile") Topic Author
- [ Offline](/forum/user/39506-squashtoppertje)

Less More

- Posts: 45
- Thank you received: 0
-
-

10 years 11 months ago [\#220791](#220791) by [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")  Replied by *[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")* on topic *[Send confirmation mail to linked other adresses](/forum/31-development/880364-send-confirmation-mail-to-linked-other-adresses#220791 "-- HikaShop version -- : 2.6.0 Business -- Joomla version -- : 3.4.1  Hi,  I need to get the following done. When a (b2b) customer orders products and gets a confirmation email, I also need to send that email(copy) to his account manager. What makes it more difficult is that different customers have different account managers. So I can not just add an address in the BCC field.  I want to add the emailadress and name of the account manager to the database. This could be the case: Customer 1 orders &gt; copy confirmation to email Account Manager A Customer 2 orders &gt; copy confirmation to email Account Manager A Customer 3 orders &gt; copy confirmation to email Account Manager B Etc.  Do you have some tips how to get this done?  Thanks very much!  EDIT: , but that didn't do the trick for me.")*

Hi,

I also tried adding this code to the HTML-version of the e-mail, but no luck.

Furthermore I tried the following code in the preload version, but this throw a 500-error: Code:

if(!empty($data-&gt;customer-&gt;emailteama)){ $this-&gt;mail-&gt;addBCC($data-&gt;customer-&gt;emailteama); } if(!empty($data-&gt;customer-&gt;emailteamb)){ $this-&gt;mailer-&gt;addBCC($data-&gt;customer-&gt;emailteamb); }

Don't know if this matters, as the basic $this-&gt;mailer-&gt;addBCC('AM1@example.com'); does not result in an extra mail?

Could you please assist me with this?

Thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MDM2NC1zZW5kLWNvbmZpcm1hdGlvbi1tYWlsLXRvLWxpbmtlZC1vdGhlci1hZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14296
-
-

10 years 11 months ago [\#221059](#221059) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Send confirmation mail to linked other adresses](/forum/31-development/880364-send-confirmation-mail-to-linked-other-adresses#221059 "-- HikaShop version -- : 2.6.0 Business -- Joomla version -- : 3.4.1  Hi,  I need to get the following done. When a (b2b) customer orders products and gets a confirmation email, I also need to send that email(copy) to his account manager. What makes it more difficult is that different customers have different account managers. So I can not just add an address in the BCC field.  I want to add the emailadress and name of the account manager to the database. This could be the case: Customer 1 orders &gt; copy confirmation to email Account Manager A Customer 2 orders &gt; copy confirmation to email Account Manager A Customer 3 orders &gt; copy confirmation to email Account Manager B Etc.  Do you have some tips how to get this done?  Thanks very much!  EDIT: , but that didn't do the trick for me.")*

Hi,

The 500 error is because $this-&gt;mail doesn't have any addBCC function, so you can't have that code.
But yes, that code should work.
Alternatively, you can try this one: Code:

if(!is_array($mail-&gt;bcc_email)) $mail-&gt;bcc_email = explode(',', $mail-&gt;bcc_email); $mail-&gt;bcc_email[]=$data-&gt;customer-&gt;emailteamb;

The following user(s) said Thank You: [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MDM2NC1zZW5kLWNvbmZpcm1hdGlvbi1tYWlsLXRvLWxpbmtlZC1vdGhlci1hZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")**
- [![Squashtoppertje's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile") Topic Author
- [ Offline](/forum/user/39506-squashtoppertje)

Less More

- Posts: 45
- Thank you received: 0
-
-

10 years 11 months ago [\#221077](#221077) by [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")  Replied by *[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")* on topic *[Send confirmation mail to linked other adresses](/forum/31-development/880364-send-confirmation-mail-to-linked-other-adresses#221077 "-- HikaShop version -- : 2.6.0 Business -- Joomla version -- : 3.4.1  Hi,  I need to get the following done. When a (b2b) customer orders products and gets a confirmation email, I also need to send that email(copy) to his account manager. What makes it more difficult is that different customers have different account managers. So I can not just add an address in the BCC field.  I want to add the emailadress and name of the account manager to the database. This could be the case: Customer 1 orders &gt; copy confirmation to email Account Manager A Customer 2 orders &gt; copy confirmation to email Account Manager A Customer 3 orders &gt; copy confirmation to email Account Manager B Etc.  Do you have some tips how to get this done?  Thanks very much!  EDIT: , but that didn't do the trick for me.")*

YESSSSS! THIS IS IT!! ![:cheer:](/media/kunena/emoticons/2.png ":cheer:")

This works great. Thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MDM2NC1zZW5kLWNvbmZpcm1hdGlvbi1tYWlsLXRvLWxpbmtlZC1vdGhlci1hZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")**
- [![Squashtoppertje's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile") Topic Author
- [ Offline](/forum/user/39506-squashtoppertje)

Less More

- Posts: 45
- Thank you received: 0
-
-

9 years 10 months ago [\#258086](#258086) by [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")  Replied by *[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")* on topic *[Send confirmation mail to linked other adresses](/forum/31-development/880364-send-confirmation-mail-to-linked-other-adresses#258086 "-- HikaShop version -- : 2.6.0 Business -- Joomla version -- : 3.4.1  Hi,  I need to get the following done. When a (b2b) customer orders products and gets a confirmation email, I also need to send that email(copy) to his account manager. What makes it more difficult is that different customers have different account managers. So I can not just add an address in the BCC field.  I want to add the emailadress and name of the account manager to the database. This could be the case: Customer 1 orders &gt; copy confirmation to email Account Manager A Customer 2 orders &gt; copy confirmation to email Account Manager A Customer 3 orders &gt; copy confirmation to email Account Manager B Etc.  Do you have some tips how to get this done?  Thanks very much!  EDIT: , but that didn't do the trick for me.")*

Well, this did work. However, after updating Joomla to 3.6.4. this does not seem to work anymore. BCC-mail is not being send anymore.

Have you got any idea why and how to solve this?

Thanks!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MDM2NC1zZW5kLWNvbmZpcm1hdGlvbi1tYWlsLXRvLWxpbmtlZC1vdGhlci1hZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26395
- Thank you received: 4077
-
- [](http://obsi.dev)
-

9 years 10 months ago [\#258131](#258131) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Send confirmation mail to linked other adresses](/forum/31-development/880364-send-confirmation-mail-to-linked-other-adresses#258131 "-- HikaShop version -- : 2.6.0 Business -- Joomla version -- : 3.4.1  Hi,  I need to get the following done. When a (b2b) customer orders products and gets a confirmation email, I also need to send that email(copy) to his account manager. What makes it more difficult is that different customers have different account managers. So I can not just add an address in the BCC field.  I want to add the emailadress and name of the account manager to the database. This could be the case: Customer 1 orders &gt; copy confirmation to email Account Manager A Customer 2 orders &gt; copy confirmation to email Account Manager A Customer 3 orders &gt; copy confirmation to email Account Manager B Etc.  Do you have some tips how to get this done?  Thanks very much!  EDIT: , but that didn't do the trick for me.")*

Hi,

Joomla 3.5.1 had some modifications in the mail system.
But latest version of HikaShop have all required patch to all it.
See :
[ www.hikashop.com/forum/checkout/883603-4...heckout-process.html](https://www.hikashop.com/forum/checkout/883603-404-error-on-step-3-of-checkout-process.html)
[ www.hikashop.com/forum/orders-management...tion-recipients.html](https://www.hikashop.com/forum/orders-management/874576-solved-conditional-admin-notification-recipients.html)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MDM2NC1zZW5kLWNvbmZpcm1hdGlvbi1tYWlsLXRvLWxpbmtlZC1vdGhlci1hZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.092 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
