You need to sign in to do that
Don't have an account?
firstqa system
lead generation from small email instead of Salesforce generated mail
hello wrote apex class and created email services but it is only working when i send the email to the very long sf generated email address and lead is generating but i need to generate lead when i give small email address like first@gmail.com
This is my apex code
global class CreateLeadFrmEmail implements Messaging.InboundEmailHandler {
global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email,
Messaging.InboundEnvelope envelope) {
Messaging.InboundEmailResult result = new Messaging.InboundEmailresult();
// String subToCompare = 'CreateLead';
// if(email.subject.equalsIgnoreCase(subToCompare))
//{
FirstQA_Leads__c c = new FirstQA_Leads__c();
c.Name= email.fromAddress;
c.Description__c=email.plainTextBody;
c.Lead_Status__c='from email';
insert c;
result.success = true;
return result;
}
}
kindly help me in this Thanks in advance
Regards
Syed E H Mazhari
mazharibobby829@gmail.com
8328174785
This is my apex code
global class CreateLeadFrmEmail implements Messaging.InboundEmailHandler {
global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email,
Messaging.InboundEnvelope envelope) {
Messaging.InboundEmailResult result = new Messaging.InboundEmailresult();
// String subToCompare = 'CreateLead';
// if(email.subject.equalsIgnoreCase(subToCompare))
//{
FirstQA_Leads__c c = new FirstQA_Leads__c();
c.Name= email.fromAddress;
c.Description__c=email.plainTextBody;
c.Lead_Status__c='from email';
insert c;
result.success = true;
return result;
}
}
kindly help me in this Thanks in advance
Regards
Syed E H Mazhari
mazharibobby829@gmail.com
8328174785
This behaviour is working as designed and there is no workaround. Salesforce generates a unique domain-part for each email service address to ensure that no two email service addresses are identical.
To elaborate, as salesforce does not offer OOTB functionality for Email to lead, you create an email service class in apex using code like below
After you create Email Service, you will be provided with an option to "add new email address"
During this step, in the email address field, you will only be permitted to specify the local-part(As in below example: service1) of the email address. Salesforce.com assigns the domain name part of the address.
Example: service1@14a1zhmclcbpqrstd8ba7l8y6073hzyoikc5vl7ehg35a5fyx.7f-wxvuaa.ap5.apex.salesforce.com
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you