You need to sign in to do that
Don't have an account?
Lee_Campbell
Deploying an inbound mail handler...
I'm trying to set up a service that generates an email and then uses the contents of the response to update a field. To do this, I set my mail.replyTo address on the outbound message as the huge auto-generated inbound mail handler address. Later, staring into the fridge thinking about what I wanted on my sandwich, it dawned on me that, when I try to deploy that into a production environment, it's not going to work, because the email address will be different. Any clues as to how I get round that?
Thanks,
Lee
Lee
Use a Custom Setting --- the production instance can be set to the production inbound email service address; the sandbox instance can be set to the sandbox inbound email service address.
That said, those inbound email service addresses are messy to read so you might want to set up an alias in your email system that auto-forwards to the sfdc inbound email address (plus you can use your own domainrather than a salesforce.com domain)
All Answers
You need to create an inbound email service on both production and sandbox; they will have different generated email addresses. However, both email services will refer to the same APEX inbound email service class
Thanks for your reply.
I appreciate that they will refer to the same inbound email class, but I want to force the "replyTo" address to be that of the inbound message handler. How can I do that? In the replyTo method, what argument can refer generically to this inbound message handler email address?
Lee
Use a Custom Setting --- the production instance can be set to the production inbound email service address; the sandbox instance can be set to the sandbox inbound email service address.
That said, those inbound email service addresses are messy to read so you might want to set up an alias in your email system that auto-forwards to the sfdc inbound email address (plus you can use your own domainrather than a salesforce.com domain)
Good plan, Eric. Thank you! I shall do just that.
Lee