Issue with SendMessage API – "Index was outside the bounds of the array."
Problem reported by yerim kim - Today at 6:37 PM
Submitted

Hello,

I am currently evaluating SmarterMail with the Free license before moving forward with a purchase.

As part of the testing, I am developing an API integration for sending and receiving mail. Receiving works without issues, but I am running into a problem when sending mail using the SendMessage API.

Environment: ASP.NET C#

The problem is that regardless of which parameters I include in the request, the API always responds with:

"Index was outside the bounds of the array."

Here is the request I am making:

var mailData = new
{
    to = "\"test@receive.com\" <test@receive.com>;",
    ownerEmailAddress = "send@test.com",
    from = "send@test.com",
    subject = "test",
    messageHTML = "test"
};

I have checked the community forum, but I have not been able to find a post that addresses this specific error.

Could you please advise what might be causing this?

  • Is there an issue with the request payload format?

  • Or is there a domain/mailbox configuration setting in SmarterMail that I need to adjust?

The API documentation does not provide enough information for me to determine the cause. Any guidance or suggestions would be greatly appreciated.

Thank you.

Zach Sylvester Replied
Employee Post
Try setting the To like this 
to = "test@receive.com"

Let me know if this helps.
Zach Sylvester Software Developer SmarterTools Inc. www.smartertools.com

Reply to Thread

Enter the verification text