feat(structure): Use unified Email class

This commit is contained in:
2025-05-27 15:38:34 +00:00
parent cfea44742a
commit 243a45d24c
11 changed files with 546 additions and 143 deletions

View File

@ -640,6 +640,34 @@ export class Email {
return this.from;
}
/**
* Get the subject (Smartmail compatibility method)
* @returns The email subject
*/
public getSubject(): string {
return this.subject;
}
/**
* Get the body content (Smartmail compatibility method)
* @param isHtml Whether to return HTML content if available
* @returns The email body (HTML if requested and available, otherwise plain text)
*/
public getBody(isHtml: boolean = false): string {
if (isHtml && this.html) {
return this.html;
}
return this.text;
}
/**
* Get the from address (Smartmail compatibility method)
* @returns The sender email address
*/
public getFrom(): string {
return this.from;
}
/**
* Get the message ID
* @returns The message ID