function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Anshuman ParhiAnshuman Parhi 

Salesforce admin requirement

Create a record for custom object via incoming email. End user will send email to salesforce, salesforce should understand incoming new email and should create new record. Once record gets created send email to end user to inform him your record has created.  If that end user reply back to that email it should not create new record.

any solution for this kind of requirement
ANUTEJANUTEJ (Salesforce Developers) 
Hi Anshuman,

>> https://www.infallibletechie.com/2012/12/inbound-email-creating-record-using.html

You can use the below snippet which is present in above link to create a record:
 
global class createMemberInbound implements Messaging.InboundEmailHandler {
    global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, Messaging.InboundEnvelope env) {
   
        Messaging.InboundEmailResult result = new Messaging.InboundEmailResult();
         
        String myPlainText= '';    
           
        myPlainText = email.plainTextBody; 
       
        List<Member__c> memb = new List<Member__c>();
           
        try {
            Member__c mem = new Member__c(Ext_Id__c = myPlainText, Name = email.Subject);
           
            memb.add(mem);
           
            insert memb;   
            
            System.debug('New member: ' + memb);  
        }
           
        catch (Exception e) {
            System.debug('Error is: ' + e);
        }  
         
        result.success = true;
        
        return result;
    }
}

Let me know if it helps you and close your query by marking it as the best answer so that it can help others in the future.  

Thanks.