You need to sign in to do that
Don't have an account?
Nakata
How can we receive email and based on email keyword to update object ?
Good day,
Do we have chance to received any email from outside of SFDC and process the email based on some keyword to update related object's fields.
Thanks !
You can do this sort of thing using an InboundEmailHandler.
There's information and an example in the Apex Developer's Guide at:
http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#CSHID=apex_classes_email_inbound_using.htm|StartTopic=Content%2Fapex_classes_email_inbound_using.htm|SkinName=webhelp
All Answers
You can do this sort of thing using an InboundEmailHandler.
There's information and an example in the Apex Developer's Guide at:
http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#CSHID=apex_classes_email_inbound_using.htm|StartTopic=Content%2Fapex_classes_email_inbound_using.htm|SkinName=webhelp
Thanks bob_buzzard, this will be helpful !
Just one question, how can we do the testing of it ? for instance, what are the sender email address to send in for testing purposes ?
You don't send an email via the real service to unit test this.
You'd create a test Messaging.InboundEmail instance and execute the handleInboundEmail method.
Sorry Bob,
just want to know what are the sender email id for sender to send over when we in prod ? where to set the email id ?
The sender email will be whoever is sending the email into Salesforce.
For example, I use this to receive information about the previous days performance of a system. The sender email is the email address of the user on the remote system that the email is sent on behalf of.
Bob, apology for my bad language, i really means Salesforce email that user suppose to send ?
for instance , user A want to send to salesforce, what are the salesforce email id ?
Ah, I understand. Once you've written the email handler you have to create a service to receive the emails, via the UI.
Go to Setup -> App Setup -> Develop -> Email Services and click the new service button. Once you've created the service, this will give you a large, autogenerated email address. This is the address that you send your emails to.
Thanks Bob , appreciated your guidance !