Utente e password SMTP separati da quelli IMAP (0.24.7)
Alcuni server vogliono per l'invio un utente diverso (spesso l'indirizzo intero invece del nome corto) e una password diversa. In Account ci sono ora due campi dedicati; vuoti, restano validi l'utente SMTP dedotto e la password della posta.
This commit is contained in:
1 parent
e12a669b1e
commit
02b0f3e90d
6 files changed
+47
-7
No files matched your search
@@ -183,6 +183,28 @@ Page {
|
||||
onCurrentIndexChanged: account.smtpSecurity = currentIndex
|
||||
}
|
||||
|
||||
// Non sempre l'invio usa lo stesso utente della posta in arrivo:
|
||||
// capita che voglia l'indirizzo intero invece del nome corto.
|
||||
TextField {
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
label: qsTr("Utente per l'invio")
|
||||
placeholderText: qsTr("vuoto = utente della posta")
|
||||
inputMethodHints: Qt.ImhEmailCharactersOnly | Qt.ImhNoAutoUppercase
|
||||
text: account.smtpUser
|
||||
onTextChanged: account.smtpUser = text.trim()
|
||||
}
|
||||
|
||||
TextField {
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
label: qsTr("Password per l'invio")
|
||||
placeholderText: qsTr("vuota = password della posta")
|
||||
echoMode: TextInput.Password
|
||||
text: account.smtpPassword
|
||||
onTextChanged: if (text.length > 0) account.smtpPassword = text
|
||||
}
|
||||
|
||||
TextField {
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"tag_name": "v0.24.6", "name": "0.24.6 \u2014 personalit\u00e0 multiple e stazioni", "body": "## Personalit\u00e0 multiple e stazioni\n\n- **Personalit\u00e0 multiple**: in composizione il \u00abDa\u00bb \u00e8 una scelta fra i mittenti configurati, quando gli account sono pi\u00f9 di uno. Da lui dipende anche l'SMTP usato per l'invio. Con un solo account il campo resta libero, come prima.\n- **Stazioni** (testi pronti): si salvano dal testo che si sta scrivendo (menu \u2192 \u00abSalva il testo come stazione\u00bb), si inseriscono nel corpo dal menu, si eliminano da Account. Sono legate all'account.\n\n## Documento allineato\n\nDue voci risultavano aperte ma erano gi\u00e0 state fatte: la **sottoscrizione di una cartella esistente** (0.23.0) e la **rinomina/eliminazione delle cartelle di un account** (0.23.0, che passano da @RENAME e @DELETE sul server).\n\n## Ancora aperte, con il motivo\n\n- **punteggio antispam**: Mail_Junk.Score esiste nel motore ma non \u00e8 esportato dallo shim; serve una funzione C nuova e la ricompilazione del motore.\n- **filtro manuale**: il motore filtra cartelle intere, non messaggi scelti; prima va deciso cosa significa filtrarne tre.\n- **sottocartelle** (Sent/Prova): il delimitatore del server si conosce solo dentro la sessione IMAP.\n- **push**: il watcher va installato sul server e richiede sudo.\n- PGP, JMAP, ortografia, importazione, stampa, liste e vCard: invariati.", "draft": false}
|
||||
@@ -1,6 +1,6 @@
|
||||
Name: harbour-grumpydove
|
||||
Summary: Eudora-style mail interface, mobile prototype
|
||||
Version: 0.24.6
|
||||
Version: 0.24.7
|
||||
Release: 1
|
||||
Group: Qt/Qt
|
||||
# Codice EUPL-1.2; le icone vengono dagli sprite di Eudora, BSD 3-Clause
|
||||
|
||||
+12
-3
@@ -44,6 +44,7 @@ void AccountSettings::loadUno(QSettings &s, int i)
|
||||
d.smtpHost = s.value(g + "smtp_host").toString();
|
||||
d.smtpPort = s.value(g + "smtp_port", 587).toInt();
|
||||
d.smtpSecurity = s.value(g + "smtp_security", 1).toInt();
|
||||
d.smtpUser = s.value(g + "smtp_user").toString();
|
||||
d.smtpPassword = s.value(g + "smtp_password").toString();
|
||||
d.keep = s.value(g + "keep", 500).toInt();
|
||||
d.firma = s.value(g + "firma").toString();
|
||||
@@ -80,6 +81,7 @@ void AccountSettings::load()
|
||||
d.smtpHost = s.value(QStringLiteral("account/smtp_host")).toString();
|
||||
d.smtpPort = s.value(QStringLiteral("account/smtp_port"), 587).toInt();
|
||||
d.smtpSecurity = s.value(QStringLiteral("account/smtp_security"), 1).toInt();
|
||||
d.smtpUser = s.value(QStringLiteral("account/smtp_user")).toString();
|
||||
d.smtpPassword = s.value(QStringLiteral("account/smtp_password")).toString();
|
||||
d.keep = s.value(QStringLiteral("account/keep"), 500).toInt();
|
||||
d.firma = s.value(QStringLiteral("account/firma")).toString();
|
||||
@@ -108,6 +110,7 @@ void AccountSettings::saveUno(QSettings &s, int i) const
|
||||
s.setValue(g + "smtp_host", d.smtpHost);
|
||||
s.setValue(g + "smtp_port", d.smtpPort);
|
||||
s.setValue(g + "smtp_security", d.smtpSecurity);
|
||||
s.setValue(g + "smtp_user", d.smtpUser);
|
||||
s.setValue(g + "smtp_password", d.smtpPassword);
|
||||
s.setValue(g + "keep", d.keep);
|
||||
s.setValue(g + "firma", d.firma);
|
||||
@@ -164,6 +167,8 @@ QString AccountSettings::password() const { return corrente().password; }
|
||||
QString AccountSettings::smtpHost() const { return corrente().smtpHost; }
|
||||
int AccountSettings::smtpPort() const { return corrente().smtpPort; }
|
||||
int AccountSettings::smtpSecurity() const { return corrente().smtpSecurity; }
|
||||
QString AccountSettings::smtpUser() const { return corrente().smtpUser; }
|
||||
QString AccountSettings::smtpPassword() const { return corrente().smtpPassword; }
|
||||
int AccountSettings::keep() const { return corrente().keep; }
|
||||
QString AccountSettings::firma() const { return corrente().firma; }
|
||||
QString AccountSettings::bookUrl() const { return corrente().bookUrl; }
|
||||
@@ -180,6 +185,8 @@ void AccountSettings::setPassword(const QString &v) { if (corrente().password !=
|
||||
void AccountSettings::setSmtpHost(const QString &v) { if (corrente().smtpHost != v) { corrente().smtpHost = v; emit changed(); } }
|
||||
void AccountSettings::setSmtpPort(int v) { if (corrente().smtpPort != v) { corrente().smtpPort = v; emit changed(); } }
|
||||
void AccountSettings::setSmtpSecurity(int v) { if (corrente().smtpSecurity != v) { corrente().smtpSecurity = v; emit changed(); } }
|
||||
void AccountSettings::setSmtpUser(const QString &v) { if (corrente().smtpUser != v) { corrente().smtpUser = v; emit changed(); } }
|
||||
void AccountSettings::setSmtpPassword(const QString &v) { if (corrente().smtpPassword != v) { corrente().smtpPassword = v; emit changed(); } }
|
||||
void AccountSettings::setKeep(int v) { if (corrente().keep != v) { corrente().keep = v; emit changed(); } }
|
||||
void AccountSettings::setFirma(const QString &v) { if (corrente().firma != v) { corrente().firma = v; emit changed(); } }
|
||||
void AccountSettings::setBookUrl(const QString &v) { if (corrente().bookUrl != v) { corrente().bookUrl = v; emit changed(); } }
|
||||
@@ -328,9 +335,11 @@ QString AccountSettings::rigaSmtp(const Dati &d)
|
||||
// per SMTP vogliono l'indirizzo completo: con "carlo" rispondono
|
||||
// "421 login denied". Se l'utente non ha la chiocciola e il mittente sì,
|
||||
// all'autenticazione SMTP si manda il mittente; l'IMAP resta com'è.
|
||||
const QString utenteSmtp =
|
||||
(d.user.contains(QLatin1Char('@')) || !d.mittente.contains(QLatin1Char('@')))
|
||||
? d.user : d.mittente;
|
||||
// Se l'utente SMTP e' scritto in Account si usa quello, senza indovinare.
|
||||
const QString utenteSmtp = d.smtpUser.trimmed().isEmpty()
|
||||
? ((d.user.contains(QLatin1Char('@')) || !d.mittente.contains(QLatin1Char('@')))
|
||||
? d.user : d.mittente)
|
||||
: d.smtpUser.trimmed();
|
||||
return QString("%1\t%2\t%3\t%4\t%5")
|
||||
.arg(d.smtpHost, QString::number(d.smtpPort),
|
||||
QString::number(d.smtpSecurity), utenteSmtp, d.smtpPassword);
|
||||
|
||||
@@ -30,6 +30,10 @@ class AccountSettings : public QObject
|
||||
Q_PROPERTY(QString smtpHost READ smtpHost WRITE setSmtpHost NOTIFY changed)
|
||||
Q_PROPERTY(int smtpPort READ smtpPort WRITE setSmtpPort NOTIFY changed)
|
||||
Q_PROPERTY(int smtpSecurity READ smtpSecurity WRITE setSmtpSecurity NOTIFY changed)
|
||||
// Alcuni server vogliono un utente diverso per l'invio (o l'indirizzo
|
||||
// intero invece del nome corto): vuoto = lo stesso dell'IMAP.
|
||||
Q_PROPERTY(QString smtpUser READ smtpUser WRITE setSmtpUser NOTIFY changed)
|
||||
Q_PROPERTY(QString smtpPassword READ smtpPassword WRITE setSmtpPassword NOTIFY changed)
|
||||
Q_PROPERTY(int keep READ keep WRITE setKeep NOTIFY changed)
|
||||
// Firma aggiunta ai messaggi nuovi (testo semplice).
|
||||
Q_PROPERTY(QString firma READ firma WRITE setFirma NOTIFY changed)
|
||||
@@ -54,6 +58,8 @@ public:
|
||||
QString smtpHost() const;
|
||||
int smtpPort() const;
|
||||
int smtpSecurity() const;
|
||||
QString smtpUser() const;
|
||||
QString smtpPassword() const;
|
||||
int keep() const;
|
||||
QString firma() const;
|
||||
QString bookUrl() const;
|
||||
@@ -72,6 +78,8 @@ public:
|
||||
void setSmtpHost(const QString &v);
|
||||
void setSmtpPort(int v);
|
||||
void setSmtpSecurity(int v);
|
||||
void setSmtpUser(const QString &v);
|
||||
void setSmtpPassword(const QString &v);
|
||||
void setKeep(int v);
|
||||
void setFirma(const QString &v);
|
||||
void setBookUrl(const QString &v);
|
||||
@@ -124,7 +132,7 @@ signals:
|
||||
private:
|
||||
struct Dati {
|
||||
QString persona, mittente, imapHost, user, password;
|
||||
QString smtpHost, smtpPassword;
|
||||
QString smtpHost, smtpUser, smtpPassword;
|
||||
QString bookUrl, bookUser, bookPassword;
|
||||
QString firma;
|
||||
QStringList stazioniNomi, stazioniTesti;
|
||||
|
||||
+2
-2
@@ -32,9 +32,9 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
|
||||
|
||||
app->setOrganizationName(QStringLiteral("harbour"));
|
||||
app->setApplicationName(QStringLiteral("grumpydove"));
|
||||
app->setApplicationVersion(QStringLiteral("0.24.6"));
|
||||
app->setApplicationVersion(QStringLiteral("0.24.7"));
|
||||
|
||||
qDebug() << "harbour-grumpydove v0.24.6 build" << __DATE__ << __TIME__;
|
||||
qDebug() << "harbour-grumpydove v0.24.7 build" << __DATE__ << __TIME__;
|
||||
|
||||
// Maildir, log, rubrica e liste dei filtri nella cartella dati dell'app:
|
||||
// la sandbox non lascia vedere ~/Mail né scrivere sotto HOME, e cambiare
|
||||
|
||||
Reference in new issue
Block a user