16 lines
743 B
TypeScript
16 lines
743 B
TypeScript
import type { Endpoint } from 'payload';
|
|
/**
|
|
* Custom endpoint: send a test email to a given address through whatever
|
|
* transport is currently active (SMTP or Graph — mailAdapter reads the panel
|
|
* setting per send, so the test exercises the REAL path a form email would
|
|
* take). Mounted at POST /api/ipal/test-email.
|
|
*
|
|
* Admin-only: uses payload.sendEmail (server-side), and requires an
|
|
* authenticated admin user — a test-send button must never be open to the
|
|
* public (it would be an open relay / spam vector).
|
|
*
|
|
* Returns the adapter's own result so the panel can show exactly what happened,
|
|
* including the transport-specific error (SMTP auth failure, Graph 401, etc.).
|
|
*/
|
|
export declare const testEmailEndpoint: Endpoint;
|