Logo

Cake Planner

Backend

smtp_service.cpp

File Header Information

FieldValue
SPDX CommentSMTP Service Implementation
SPDX TypeSOURCE
ContributorZHENG Robert
License IDMIT
Filesmtp_service.cpp
DescriptionSMTP Service Implementation
Version0.15.0
Date2026-01-24
AuthorZHENG Robert (robert@hase-zheng.net)
CopyrightCopyright (c) 2026 ZHENG Robert
LicenseMIT

Table of Contents

API Documentation

namespace rz

rz namespace.


namespace service

service namespace.


SmtpService::SmtpService(const model::ConfigModel& config, QObject* parent)

Constructs the SmtpService.

ParameterDescription
configConfiguration model containing SMTP settings.
parentOptional parent QObject.

void SmtpService::sendEmailAsync(const QString& to, const QString& subject, const QString& body,

Sends an email asynchronously using Qt's event loop.

ParameterDescription
toRecipient email address.
subjectEmail subject.
bodyEmail body content.
attachmentDataOptional attachment data.
attachmentNameOptional attachment filename.

void SmtpService::doSendEmail(const QString& to, const QString& subject, const QString& body,

Internal slot to perform the actual email sending.

ParameterDescription
toRecipient email address.
subjectEmail subject.
bodyEmail body content.
attachmentDataOptional attachment data.
attachmentNameOptional attachment filename.