Mail Queue Job

Mail Queue Job

Why choose Customer FX as your Infor CRM Partner? Find out why

Mail Queue Job for Infor CRM

The Customer FX Mail Queue Job is a job for Infor CRM that implements an e-mail queue and allows sending e-mails by simply adding records to a MailQueue table.

If all you need is the ability to send e-mails from CRM, instead of implementing KnowledgeSync or TaskCentre this job will allow you to easily send emails from anywhere inside of CRM.

Using the Mail Queue Job

To use this job, simply perform the following steps:

  1. Install the provided bundle Customer FX Mail Queue Job
  2. Once installed, open the Job Service portal in Application Architect.
  3. Right click the FX.MailQueue.Job under the Jobs tab and select “Add Schedule”.
  4. Set the schedule to execute “every 1 minute“.
  5. Under the SupportFiles tab of the Job Service portal, locate the file “FXMailQueue.config” and double-click it to edit.
  6. Edit the file to add your SMTP settings, then save it.
  7. Deploy the Job Service Portal.
  8. Restart the windows service “Saleslogix Job Service”

To use, simply add a record to the MailQueue table. This can be done directly in SQL, SData, or using the entity model. For example:

var mail = Sage.Platform.EntityModel.Create<Sage.Entity.Interfaces.IMailQueue>();
mail.ToAddress = ""; // can be mulitple recipients, comma-delimited 
mail.FromAddress = "";
mail.Subject = "Test Email";
mail.Body = "This is a test e-mail";

// optional, record as a note on a contact 
mail.RecordForContactId = "CXXXX0000001";

// optional, attach a file
mail.AttachmentPath = @"C:\SomeFolder\SomeFile.pdf";

// optional, delay sending until a specific date/time
mail.DelayUntil = DateTime.Now.AddMinutes(30);

// now the mail will be sent

There is also an entity business rule on the MailQueue entity called MailQueueProcessed. This business rule will be executed for each e-mail processed, allowing you to add custom logic to the processing of each e-mail.

Note: If an error occurs when sending the e-mail, the MailQueue record will be updated with the error details and the job will attempt to send it again on it’s next execution. If the email is sent successfully, the MailQueue record will be deleted.

Download the Customer FX Mail Queue Job


Note: Source is also available on Github, visit the repository here.

 The following articles will assist you in getting started

The Customer FX Mail Queue Job is licensed under the GNU v3.0 License. View the license details. No warranties are given or implied. Use as-is at your own risk.

Want content like this delivered to your inbox? Sign up for our newsletter!