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
Suman GiriSuman Giri 

Could we automate the process of creating Email Service with Apex

Hi All,

 

Could I automate the proces of creating an Email Service using Apex code, normally we follow the below steps to create the Email Service:

 

To use email services, click Your Name | Setup | Develop | Email Services.

  • Click New Email Service to define a new email service.
  • Select an existing email service to view its configuration, activate or deactivate it, and view or specify addresses for that email service.
  • Click Edit to make changes to an existing email service.
  • Click Delete to delete an email service.

 

Is there a way I can automate the above steps using Apex ?

Another question being....

Application we are developing has an Email Service associated and which is on Sandbox. When I create a Managed package, would this email service be part of the package I create ?

 

Appreciate if there are any pointers.

Thank You.

 

AmitSahuAmitSahu

You cannot automate the steps you have mentioned.

 

Second thing when you create a managed package the Email Services class can be a part of the package.

 

But as per my knowledge the admin who installas the managed package will have to create an email service using the email service class you will provide in the package. Then they will get a new email address for the email service.