update
This commit is contained in:
@ -19,7 +19,7 @@ export class ApiManager {
|
||||
*/
|
||||
private registerApiEndpoints() {
|
||||
// Register the SendEmail endpoint
|
||||
this.typedRouter.addTypedHandler<plugins.servezoneInterfaces.platformservice.mta.IRequest_SendEmail>(
|
||||
this.typedRouter.addTypedHandler<plugins.servezoneInterfaces.platformservice.mta.IReq_SendEmail>(
|
||||
new plugins.typedrequest.TypedHandler('sendEmail', async (requestData) => {
|
||||
const mailToSend = new plugins.smartmail.Smartmail({
|
||||
body: requestData.body,
|
||||
|
@ -27,7 +27,7 @@ export class MtaConnector {
|
||||
* @param options Additional options
|
||||
*/
|
||||
public async sendEmail(
|
||||
smartmail: plugins.smartmail.Smartmail<>,
|
||||
smartmail: plugins.smartmail.Smartmail<any>, // TODO: look at type
|
||||
toAddresses: string | string[],
|
||||
options: any = {}
|
||||
): Promise<string> {
|
||||
@ -82,7 +82,7 @@ export class MtaConnector {
|
||||
* For MTA, this would handle an email already received by the SMTP server
|
||||
* @param emailData The raw email data or identifier
|
||||
*/
|
||||
public async receiveEmail(emailData: string): Promise<plugins.smartmail.Smartmail<>> {
|
||||
public async receiveEmail(emailData: string): Promise<plugins.smartmail.Smartmail<any>> {
|
||||
try {
|
||||
// In a real implementation, this would retrieve an email from the MTA storage
|
||||
// For now, we can use a simplified approach:
|
||||
@ -97,7 +97,7 @@ export class MtaConnector {
|
||||
body: parsedEmail.html || parsedEmail.text || '',
|
||||
creationObjectRef: {
|
||||
From: parsedEmail.from?.text || '',
|
||||
To: parsedEmail.to?.text || '',
|
||||
To: parsedEmail.to,
|
||||
Subject: parsedEmail.subject || ''
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user