Skip to content

Instantly share code, notes, and snippets.

@dcinzona
Created July 10, 2017 16:16
Show Gist options
  • Select an option

  • Save dcinzona/204b7a5f66db022a391b7cd3fc9ca706 to your computer and use it in GitHub Desktop.

Select an option

Save dcinzona/204b7a5f66db022a391b7cd3fc9ca706 to your computer and use it in GitHub Desktop.
Email-to-case with Dynamic email aliasing

Setting up a test environment (using GMAIL as the forwarder)

The gist here is that you will be using a dynamic email alias to forward emails to salesforce by using a combination of filters and forwarders in gmail. Dynamic email aliasing is the concept of adding a "+alias" string after your email username, so myuser@gmail.com would become myuser+sandboxalias@gmail.com

This works well with Acumen Solutions as Acumen uses GMAIL as the email service provider. You can set up your own email-to-case forwarding alias to your SFDC sandboxes without requiring any external administrator support.

  1. Salesforce: Create an email-to-case routing address and point it to yourusername+sandboxalias@acumensolutions.com (so for me, this would be gtandeciarz+gmtdev@acumensolutions.com
  2. Gmail: Verify the service from your acumen email (you should have a new email from Salesforce Sandbox with a link to verify the email address)
  3. Gmail: Create a forwarding email address in Gmail by going to Settings > Forwarding and POP/IMAP (don't enable it, just created) a. This is the Email Service Address specified in your sandbox b. Salesforce: This will have gmail send an email to the salesforce mailbox, so you'll have to go into your salesforce instance, find the case it created and click on the link to verify the email.
  4. Gmail: Create a new filter in Settings > Filters and Blocked Addresses
  5. Gmail: In the filter definition, select the option to forward the emails to your new forwarding address.
  6. Done.

This will automatically forward emails sent to your +alias email address to your Salesforce sandbox. You can use this technique to test incoming emails and email-to-case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment