Problem with sending automatic onboarding emails to new contacts with Business Process
Hi,
I'm trying to implement a simple Business Process to send an automatic Welcome\Onboarding email, when a new contact is created.
At this moment, the email has not been sent, and I have an error in the Process Log.
Has anyone faced this problem?
Follows the error:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Terrasoft.Mail.Sender.EmailMessage.GetMessageId()
at IntegrationV2.EmailClient.Send(EmailMessage emailMessage, Boolean ignoreRights)
at Terrasoft.Mail.Sender.EmailSender.SendMessage(IEmailClient emailClient, EmailMessage emailMessage, Boolean ignoreRights)
at Terrasoft.Core.Process.Configuration.AutoEmailUserTaskSender.SendEmailWithDefaultSender(EmailMessage emailMessage, Boolean ignoreErrors)
at Terrasoft.Core.Process.Configuration.AutoEmailUserTaskSender.Execute(IEmailUserTaskMessageProvider messageProvider, ProcessExecutingContext context)
at Terrasoft.Core.Process.ProcessFlowElement.CallInternalExecute(ProcessExecutingContext context)
at Terrasoft.Core.Process.ProcessActivity.RunInCultureScope[T](Func`1 action)
at Terrasoft.Core.Process.ProcessActivity.ExecuteElement(ProcessExecutingContext context)
at Terrasoft.Core.Process.ProcessActivity.ExecuteItem(ProcessExecutingContext context)
at Terrasoft.Core.Process.ProcessFlowElement.Execute(ProcessExecutingContext context)
Like
In this case, I recommend checking the system settings and mail operation, which is filled in the system settings. For example, if you transferred a system setting from another environment, its value may contain mail with an incorrect id or be empty.
Hello,
This error in the business process can occur for the following reasons:
1. The mail indicated in the "To" field is not correctly configured on the environment and does not work
2. If the mail is not specified directly from the window and is filled in when reading the data in other elements, it is possible that this field remains empty and you receive the corresponding error
3. The user whose mail is read does not have registered mailboxes, or the user who starts the process does not have access rights to this mailbox (accordingly, the element returns an empty Id)
In general, this problem consists of incorrect filling of the "To" field, so we recommend reviewing the logic of your process and making sure that the field is filled correctly.
Thank's for your reply.
At the moment, the Business Process is very simple. It just have two elements, the initial Signal and the Send email.
Follows the pictures with the actual configs, that i think it should be all correct.
In this case, I recommend checking the system settings and mail operation, which is filled in the system settings. For example, if you transferred a system setting from another environment, its value may contain mail with an incorrect id or be empty.
Hi Halyna,
I checked the System Setting and it was missing the email address on the default field.
Many thanks for your help.