Early Black Friday: Divi Doctor Lifetime for $129 (unlimited sites). Ends Cyber Monday. 14-day money-back guarantee.

CC, BCC, routing and the sending page

Divi’s Contact Form sends every message to the addresses in its Email Address setting, and the email doesn’t say which page it came from. Divi Doctor adds two options you can switch on separately: CC, BCC and routing by field, to copy other people or send a message to a different address depending on what the visitor picked, and Page the form was sent from, to put the page’s title and address in the email.

Adding a CC address and a Send To rule for a Department field, then the emails that arrive with the page they were sent from.

Switch the options on

  1. Go to Divi Doctor → Features.
  2. Under Contact Form module, click Enable on the cards you want: CC, BCC and routing by field and Page the form was sent from.

Both add options to the Content → Email group of every Divi 5 Contact Form. A form uses them only when you set them on that form; until then it sends exactly as Divi does.

Copy other addresses

  1. Open the page in the Visual Builder and open the Contact Form’s settings.
  2. In Content → Email, type one or more addresses into CC, BCC or both. They sit right after Email Address.
  3. Save the page.
  • CC addresses get a copy of every message. BCC addresses get a hidden copy: the other recipients don’t see them.
  • Separate addresses with commas. Semicolons and spaces work too.
  • Use plain addresses such as office@example.com. An entry that isn’t a valid address is skipped, and an address listed twice is used once.
  • Up to 20 addresses per field.
  • The addresses stay on the server. Visitors never see them.

Send messages to different addresses

Send To Rules picks the recipient from what the visitor chose in a field. For example, a “Department” menu can send sales questions to your sales team and support questions to your help desk.

  1. In the Contact Form’s Content → Elements, add a field, for example with Type set to Select, and give it options such as “Sales” and “Support”.
  2. In the field’s Content → Text group, set its Field ID, for example department.
  3. Back in the form’s Content → Email, write one rule per line in Send To Rules:
department = Sales -> sales@example.com
department = Support -> help@example.com, tech@example.com

Save the page. Each rule reads “when this field has this value, send to these addresses”. How the rules are read:

  • The part before = is the field’s Field ID. The part between = and -> is the value. => and → work in place of ->.
  • For a Select or Radio field, the value is the option’s text. Capitals and extra spaces don’t matter, but the whole value must match: there’s no “contains”.
  • A Checkbox field matches when one of the ticked options has the value.
  • The first rule that matches decides, and its addresses are used instead of the form’s Email Address. When no rule matches, the message goes to the Email Address as usual.
  • CC and BCC still get their copy, whichever rule matched.
  • A rule can list up to 20 addresses, separated by commas. A line starting with # is ignored, and so is a line that doesn’t follow the pattern or has no valid address.
  • A field hidden by conditional logic isn’t sent, so its rules are skipped.

If the form also sends a confirmation email, its Reply-To is the first address of the rule that matched, so a visitor’s reply reaches the right team.

How it works

Divi checks the form, its captcha and spam protection exactly as before. Only when Divi has accepted the message does Divi Doctor change the recipients and add the CC and BCC lines to Divi’s own email, right before Divi sends it. A message Divi refuses is never sent anywhere. Every address is checked and can’t contain line breaks, so nothing a visitor types can add mail headers; what the visitor picked is only compared with your rule values.

Show the page the form was sent from

With Page the form was sent from on, you can add the page to the email in two ways. Both work for forms in Theme Builder layouts too, such as a form in your footer.

OptionWhat it doesDefault
Add The Page To The Email (in Content → Email)Adds a line at the end of the email: Sent from: Page title — https://example.com/page/. In an HTML email the address is a link.Off
%%page_url%%The page’s full address, including any query string, in the Message Pattern or the Subject.—
%%page_title%%The page’s title, in the Message Pattern or the Subject.—
  • The Subject field is part of Custom email subject, so switch that on to use the placeholders there.
  • The title is the title of the post or page being viewed, or the category, tag or author name on an archive. A home page that lists your latest posts uses your site title.
  • The address is built from your site’s own address, never from what the browser sends, so it always points to your site.
  • In the confirmation email, the two placeholders are filled only when the form uses Content → Spam Protection → Use A Spam Protection Service, like every value a visitor can influence. The Sent from line is never added to the confirmation.
  • A form field with the Field ID page_url or page_title keeps its own value.

Check that it works

  1. Add a Select field with the ID department, a rule for one of its options and a CC address, and switch on Add The Page To The Email. Save the page.
  2. Open the page in a private window and send the form, choosing the option in your rule.
  3. Check both inboxes: the rule’s address and the CC address get the message, with the Sent from line at the end.
  4. To test the page line, send the same form from a second page and compare the two emails.

Each card in Divi Doctor → Features shows whether it’s on and whether Divi 5’s Contact Form was found. These two options keep no log.

Limits

  • Divi 5 Contact Form module only.
  • Up to 20 addresses per CC, BCC or rule. Rules compare whole values.
  • A mail plugin that replaces WordPress’s wp_mail() function without running its wp_mail filter doesn’t get the Sent from line or the page placeholders.
  • If you turn Page the form was sent from off, a plain-text Message Pattern sends %%page_url%% and %%page_title%% as typed, and so does Divi when Divi Doctor is deactivated. Remove them from your patterns first.
  • Turning CC, BCC and routing by field off sends every message to the Email Address only. Your addresses and rules stay saved in the form and come back when you turn it on again.

Questions

How do I add CC or BCC to the Divi 5 Contact Form?

Switch on CC, BCC and routing by field in Divi Doctor → Features, then type addresses into CC or BCC in the Contact Form’s Content → Email group. Divi Doctor is a plugin for Divi 5, and its features are off by default. Separate addresses with commas, up to 20 per field. CC addresses get a copy of every message, and BCC addresses get a hidden copy.

Can the Divi Contact Form send to different emails based on a dropdown selection?

Yes. Give a Select field a Field ID, such as department, and write one rule per line in the form’s Send To Rules, for example department = Sales -> sales@example.com. The value is the option’s text, and the whole value must match. The first rule that matches decides, and its addresses are used instead of the form’s Email Address. When no rule matches, the message goes to the Email Address as usual.

How do I see which page a Divi Contact Form was submitted from?

Switch on Page the form was sent from in Divi Doctor → Features, then turn on Add The Page To The Email in the form’s Content → Email. The email then ends with a line such as Sent from: Page title — https://example.com/page/. You can also put %%page_url%% and %%page_title%% in the Message Pattern or the Subject. Both work for forms in Theme Builder layouts too.

Do CC and BCC addresses still get a copy when a Divi Contact Form routing rule matches?

Yes. CC and BCC still get their copy, whichever rule matched; a rule only replaces the form’s Email Address. If the form also sends a confirmation email, its Reply-To is the first address of the rule that matched, so a visitor’s reply reaches the right team.

Can visitors see the CC and BCC addresses on my Divi Contact Form?

No. The addresses stay on the server, and visitors never see them. Divi Doctor adds them to Divi’s own email only after Divi has accepted the message, right before Divi sends it. Every address is checked and can’t contain line breaks, so nothing a visitor types can add mail headers. BCC addresses are also hidden from the other recipients.

For the email’s subject, HTML layout and the confirmation to the visitor, see Email subject, HTML email and confirmation email. To keep a copy of every message, with the page it came from, see Saved form entries.

For developers

  • ddoc_cf_routing_max_addresses: the most addresses read from one CC, BCC or rule (default 20, at least 1).