/projects/{project_id}/branches/{branch_id}/auth/send_test_emailSend test emailSends a test email using the SMTP server settings supplied in the request body to verify connectivity and credentials. The request body must include the full SMTP server settings (host, port, username, password, sender_email, sender_name) and the recipient_email address.
Deprecated: to test a branch's already-saved configuration, use sendNeonAuthEmailProviderTest, which reuses the stored SMTP password server-side so the caller never has to re-supply (or be able to read) it. This endpoint remains available for testing an unsaved full configuration and for non-Better-Auth providers.
Parameters
project_idstringpathrequiredThe Neon project ID
branch_idstringpathrequiredThe Neon branch ID
Request body
requiredapplication/json
hoststringrequiredHostname of the email server.
passwordstringrequiredPassword for authenticating with the SMTP server.
portintegerrequiredTCP port of the SMTP server. Common values: 25 (SMTP), 465 (SMTPS), 587 (submission).
recipient_emailstring · emailrequiredThe email address to send the test email to.
sender_emailstringrequiredEmail address used as the From address on outgoing auth emails.
sender_namestringrequiredDisplay name shown as the sender in outgoing emails.
usernamestringrequiredUsername for authenticating with the SMTP server.
{
"host": "string",
"password": "",
"port": 0,
"recipient_email": "user@example.com",
"sender_email": "string",
"sender_name": "string",
"username": "string"
}Responses
error_messagestringThe error message from the email server.
successbooleanrequiredWhether the test email was sent successfully.
{
"error_message": "string",
"success": true
}codestringrequiredmessagestringrequiredError message
request_idstringUnique identifier for the request, useful for debugging. You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
{
"code": "",
"message": "string",
"request_id": "string"
}