Use Auto-BCC to integrate a CRM or Helpdesk software

How to configure Auto-BCC to automatically send outgoing messages to another email address.

The Auto-BCC setting

You can define an Auto-BCC address for each email account. The setting can be found in Preferences > Accounts > Options

AutoBCC

Tip: Use a , to separate several email addresses.

The Auto-BCC script

If you only want to insert different BCC addresses based on the Account/From/To fields, you can create a user script to compute the right address:

  1. Create a file called user_script.js in the folder ~/Library/Application Support/Mailplane folder
  2. Open the file and create a function called mailplaneusercompute_bcc. Example:

function mailplane_user_compute_bcc(account, fromaddr, toaddr, bccaddr) {
console.log(account); // show values in inspector (Right Click > Inspect > Console)
console.log(fromaddr);
console.log(toaddr);
if (account == "ruben.bakker1@gmail.com") {
if (toaddr.search(/repliesapp.com/) != -1) {
return "help@repliesapp.com";
}
}
if (fromaddr == "ruben@mailplaneapp.com") {
return "hello@domain.com"; // set the BCC, override any previous value
}
return bccaddr; // do not change the bcc address
}

Use the View > Reload Page menu item to load or reload the script.

Tip: The script will be called when your compose a new message or when your create a reply. When you change the "From" address or leave the "To" address the script will be called to compute a new BCC address.

Published on 16 Sep 2010 by Ruben.