Allow SMTP sender to be set. Closes #7575.

This commit is contained in:
Chocobo1
2017-10-25 20:58:01 +08:00
parent acdb7a27dc
commit fc0628d35b
7 changed files with 44 additions and 19 deletions

View File

@@ -308,6 +308,16 @@ void Preferences::setMailNotificationEnabled(bool enabled)
setValue("Preferences/MailNotification/enabled", enabled);
}
QString Preferences::getMailNotificationSender() const
{
return value("Preferences/MailNotification/sender", "qBittorrent_notification@example.com").toString();
}
void Preferences::setMailNotificationSender(const QString &mail)
{
setValue("Preferences/MailNotification/sender", mail);
}
QString Preferences::getMailNotificationEmail() const
{
return value("Preferences/MailNotification/email").toString();

View File

@@ -139,6 +139,8 @@ public:
void setScanDirsLastPath(const QString &path);
bool isMailNotificationEnabled() const;
void setMailNotificationEnabled(bool enabled);
QString getMailNotificationSender() const;
void setMailNotificationSender(const QString &mail);
QString getMailNotificationEmail() const;
void setMailNotificationEmail(const QString &mail);
QString getMailNotificationSMTP() const;