email: bcc to be different from the biller email
  • mlungumlungu March 2010

    Hi,

    Is it possible to hardcode the bcc email address somewhere - it has has to be different from the "from" address. In our case the "from" address is accounts@......, which is where we want any replies to go. However, emails to that address go into a support ticket system, which causes a loop if we bcc the same address - the bcc sends it to accounts@........, accounts@.......... generates a ticket and sends a confirmation of that to - you guessed it, accounts@............, which generates a support ticket and sends it to............

    So, to cut a long story short, I would like to send a bcc to a different address so that we do have a record of the email going out, say invoicesent@.........

    Possible?

    Thanks a lot,

    Theo

  • justinjustin March 2010

    hey theo

    edit modules/invoices/email.php

    change from

    //allow split of email address via , or ;
    if (!empty($_POST['email_bcc']))
    {
    $bcc_addresses = preg_split('/\s*[,;]\s*/', $_POST['email_bcc']);

    foreach ($bcc_addresses as $bcc)
    {
    $mail->AddBCC($bcc);
    }
    }




    to



    $mail->AddBCC('[email protected]');



    test and let us know how you go

    Cheers

    Justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • mlungumlungu March 2010

    Hi Justin,

    Thanks for the reply - no cigar though......... clearly I am doing something wrong but I can't figure out what. This what I have now:

    //allow split of email address via , or ;
    if (!empty($_POST['email_bcc']))
    {
    $bcc_addresses = preg_split('/\s*[,;]\s*/', $_POST['email_bcc']);

    foreach ($bcc_addresses as $bcc)
    {
    $mail->AddBCC('[email protected]');
    }
    }


    If that is incorrect, could you nudge me in the right direction?

    Thanks a lot

    Theo

  • justinjustin March 2010

    hey theo

    just delete all that if (!empty($_POST['email_bcc'])){ $bc and replace it with the one line - as detaield below

    from:

    //allow split of email address via , or ;
    if (!empty($_POST['email_bcc']))
    {
    $bcc_addresses = preg_split('/\s*[,;]\s*/', $_POST['email_bcc']);

    foreach ($bcc_addresses as $bcc)
    {
    $mail->AddBCC('[email protected]');
    }
    }


    to:
    $mail->AddBCC('[email protected]');

    test and let us know how you go

    cheers

    justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • mlungumlungu March 2010

    Hi Justin,

    Still no cigar........ it keeps on putting the bcc address to the "from"default......

    Any other ideas?

    Thanks a stack

    Theo

  • mlungumlungu March 2010

    Correction - it DOES work!

    Silly me - the Bcc field still shows the same as the FROM field - in our case accounts@mydomain. So I never went any further and actually emailed the invoice. It does actually go to the underlying hardcoded email address though. Found that out by actually emailing it.

    So, COOL it works. Is there a way of letting the bcc field reflect the correct email address? Not a big issue but it would be nice.

    Thanks again

    Theo

  • justinjustin March 2010

    Is there a way of letting the bcc field reflect the correct email address?


    not sure what you mean - whats the correct email address ?

    cheers

    justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • mlungumlungu March 2010

    Hi Justin,

    While it works correctly now - the Bcc field still reflects the same as the "From" field - in our case [email protected] Even though it actually goes to [email protected] It's not a big thing at all, but I can see staff being confused when they email an invoice and the Bcc field appears as accounts@, but actually goes to invoicesent@.

    Hope that clarifies what I was trying to say?

    Cheers,

    Theo

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

Categories