Documentation You are here: start » v » 0.7.1 » emails

Email Receipts

What's In an Email Receipt?

An example email receipt sent by FoxyCart using the default HTML template FoxyCart's email receipts include almost everything in the web receipt, as well as any additional text you have configured in your receipt template(s). (You can see an example receipt to the right.) The major difference between the web receipt and the email receipts is that email receipts have specific sections that are only included in certain situations. We recommend you go to your FoxyCart admin, hit the “email” menu item, and review the code there are you follow along. A portion of the cheat sheet is included at the bottom of this page with details of the placeholders used.

Transaction Email Receipts

A “transaction email receipt” is what you'd probably consider to be a “normal” receipt. It's the main content section of a typical receipt, and will generally include the cart contents (via the ^^cart^^ placeholder) and transaction information (customer name, email, address, shipping info, etc., via the ^^receipt^^ placeholder).

Important to note is that the ^^cart^^ placeholder will include a block of text (customizable in your store's language section) with subscription-specific links if a subscription is present in the cart. By default, these links will allow your customers to update their payment information or cancel their subscriptions straight from the email receipts they're already receiving. If you're doing recurring billing through FoxyCart we strongly recommend taking a look at that text, and running a few test orders.

Subscription Cancellation Confirmation Email Receipts

Breaking up is hard to do, so FoxyCart allows for a customizable section to be included if (and only if) the email receipt is for a subscription cancellation. This will help you make it clear to the customer that their subscription has been set to cancel. These are sent only after a subscription has been successfully canceled through the checkout process. These emails will not send if a subscription is set to end or set to be inactive via the API.

"Update Info" Email Receipts

When a customer updates their information with the ''updateinfo'' flag, this section is included in the email receipt. In this case you likely will not want to include the ^^cart^^ placeholder, instead opting to describe that their information has been updated, if they have any questions to get in touch with customer service, or etc.

Who Gets Email Receipts?

The customer. If you have a “receipt email subject” configured in your store's “email” section, the customer will receive an email receipt for any transaction run on their account, including every time their account is billed for any recurring billing they have.

The store. If you have the “BCC store email address” checkbox checked in your store's “email” section, the store email address (as configured in your store settings) will receive a BCC copy of the email address. Note that this is a straight BCC copy, and looks identical to the customer's email receipt. If you're testing with an email address that goes to the same place as the store's email, you likely will only see one email receipt, since many mail servers would discard the extra copy as a duplicate.

Other addresses. If you'd like to send receipts to more than one person at your organization, please vote for that feature request. In the meantime, we recommend setting up a quick mail list or forwarding group. So something like store@example.com that'd forward mail to however many people would need to see email receipts. You can also see the category specific email receipts section below for info on sending to other email addresses.

Default Templates and Customizations

The default HTML email receipt template is visible at the right, but you can fully customize your email receipt much like you'd do with any other template on your store. The big difference is that email formatting is stuck in the 1990s, so you'll want to brush up on HTML email formatting. CampaignMonitor has fantastic templates and resources for CSS support in HTML emails that we highly recommend.

Also, please vote for this feature request, which will allow more intelligent use of inline CSS for your email receipts.

Category Specific Email Receipts

FoxyCart allows additional emails to be configured per category. The first option is to enable an additional customer email, which could be useful if a specific product category required extra information like conference registration information, special shipping or pickup information, or a request for additional information. The section option is for an additional admin email to be sent, which could be useful if sales of certain products need to notify specific departments within an organization.

Also, please vote for this improvement to category-specific emails if you feel that'd help you better use them.

Didn't Get an Email Receipt?

If you didn't receive an email receipt that you think you should have, please follow the steps below to ensure we've ruled out the common causes before you contact support.

  1. Check your spam folder. Though we have exceedingly high deliverability rates, and only send from clean IP addresses, it can happen.
  2. Reread the "Who Gets Email Receipts" section above, and double confirm that your customer email receipt isn't going to the same place as your store's BCC copy.
  3. Be sure that the email address actually exists and can accept mail. Quite often when we look into our mail logs we find that a mail server hasn't been set up or that the email address in question doesn't exist.
  4. Contact support, being sure to include the exact email address that isn't receiving emails.

How Emails Are Sent (SPF, DKIM, etc.)

FoxyCart sends emails according to OpenSPF best practices, and also uses both DomainKeys and DKIM to ensure mail sent from our systems are verified at the strictest level. Because of the approach we've taken to SPF, there are no SPF records you need to add to your domain's DNS.

Email Receipt Placeholders

All of the following placeholders have separate outputs for HTML and text based emails. Some of what these placeholders output can be modified in the “language” section of your FoxyCart admin.

^^receipt^^
Description: This will be replaced with data from the transaction such as the billing address, shipping address (if different than billing), custom fields, order ID, order date, and order total.
Notes: ^^checkout^^ may also be used, and behaves identically.
^^cart^^
Description: This will be replaced with the cart contents.
Notes: This placeholder also includes subscription-specific links and information (overridable in the “language” section of your FoxyCart store), allowing for cancellation and transfer of subscriptions.
^^order_id^^
Description: This will be replaced with the transaction ID.
^^receipt_url^^
Description: The URL to the revisitable receipt, for future reference.
^^store_domain^^
Description: See the Cart Placeholders section above.
^^store_name^^
Description: See the Cart Placeholders section above.
^^store_logo^^
Description: Will be replaced with your store logo as configured in your FoxyCart store admin.

Transaction Email Placeholders

^^order_begin^^
^^order_end^^
Description: Anything placed inside of these placeholders will only be included if the receipt email is for an order, and not for an update_info or sub_cancel (subscription cancellation).

Subscription Email Placeholders

^^subscription_cancel_begin^^
^^subscription_cancel_end^^
Description: Any code placed between these two placeholders will only be included if and only if the email being sent is to confirm a subscription cancellation (ie. sub_cancel=true).
Notes: The default receipts include an example of how these placeholders can be used.
^^sub_token_url^^
Description: Will be replaced with the sub_token URL.
Notes: This can be used to create links to allow customers to easily transfer cancel a subscription. See the “language” section of your FoxyCart admin for examples of how this is used.

"Update Info" Email Placeholders

^^updateinfo_begin^^
^^updateinfo_end^^
Description: Anything placed inside of these placeholders will only be included if the receipt email is for an update_info request (and not a normal transaction or a subscription cancellation).

Site Tools