Skip Navigation
Expand
Error from Mail API indicates problem with default service mailbox
Answer ID 12550   |   Last Review Date 02/15/2023

Why is my custom code using the Connect for PHP (CPHP) Mail API not working to send emails, when the same code works fine on other sites?

Environment:

Connect for PHP (CPHP) API
Oracle B2C Service

Resolution:

When sending emails using the Oracle B2C Service Mail API there must at least be an enabled service mailbox configured on the site. The Mail API MailMessage object will report errors such as the following if there is a problem with the default Service mailbox configured for the site/interface, or otherwise if there is no mailbox_id assigned in code:
 
API Fcn: mapi_mail_send via v1_4/MailMessage_Methods_v1_4.cpp, line 1017, in MailMessage::send
Pair Chain: mailbox_id
Description: Value must be >= 1, data=0