feat(structure): Use unified Email class
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user