author | alwin <alwin> | 2003-12-28 17:32:43 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-28 17:32:43 (UTC) |
commit | 696a2dcfcb65fbb24b709bbae0a18a7854e2d72c (patch) (unidiff) | |
tree | e813c9508881796cf999e9c25c05e4482c6fd9e8 /noncore/net/mail/libmailwrapper/settings.cpp | |
parent | b900cad9c050c2d5963228a2191e13053457ef1d (diff) | |
download | opie-696a2dcfcb65fbb24b709bbae0a18a7854e2d72c.zip opie-696a2dcfcb65fbb24b709bbae0a18a7854e2d72c.tar.gz opie-696a2dcfcb65fbb24b709bbae0a18a7854e2d72c.tar.bz2 |
reduced to the max...
- from address isn't setup any longer within the smtp account (it makes realy no
sense, a smtp account describes the connection to a smtp server, not the
identity of the sender)
- from address is taken from the personal info of the addressbook (thats why this
info exists). Of course the user can change it when sending an email.
- user can select a from with a selection of the mails given in their personal
infos.
- in addresspicker: use "<Firstname> <Lastname>" instead of "Filename"
- settings ui: switched of the part within the smtp accounts describing the
identitiy of user
ToDo: a dialog setting up a default signature
Diffstat (limited to 'noncore/net/mail/libmailwrapper/settings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/settings.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/noncore/net/mail/libmailwrapper/settings.cpp b/noncore/net/mail/libmailwrapper/settings.cpp index b580954..17aa1b0 100644 --- a/noncore/net/mail/libmailwrapper/settings.cpp +++ b/noncore/net/mail/libmailwrapper/settings.cpp | |||
@@ -264,27 +264,24 @@ SMTPaccount::SMTPaccount() | |||
264 | useReply = false; | 264 | useReply = false; |
265 | type = "SMTP"; | 265 | type = "SMTP"; |
266 | port = SMTP_PORT; | 266 | port = SMTP_PORT; |
267 | } | 267 | } |
268 | 268 | ||
269 | SMTPaccount::SMTPaccount( QString filename ) | 269 | SMTPaccount::SMTPaccount( QString filename ) |
270 | : Account() | 270 | : Account() |
271 | { | 271 | { |
272 | file = filename; | 272 | file = filename; |
273 | accountName = "New SMTP Account"; | 273 | accountName = "New SMTP Account"; |
274 | ssl = false; | 274 | ssl = false; |
275 | login = false; | 275 | login = false; |
276 | useCC = false; | ||
277 | useBCC = false; | ||
278 | useReply = false; | ||
279 | type = "SMTP"; | 276 | type = "SMTP"; |
280 | port = SMTP_PORT; | 277 | port = SMTP_PORT; |
281 | } | 278 | } |
282 | 279 | ||
283 | QString SMTPaccount::getUniqueFileName() | 280 | QString SMTPaccount::getUniqueFileName() |
284 | { | 281 | { |
285 | int num = 0; | 282 | int num = 0; |
286 | QString unique; | 283 | QString unique; |
287 | 284 | ||
288 | QDir dir( (QString) getenv( "HOME" ) + "/Applications/opiemail" ); | 285 | QDir dir( (QString) getenv( "HOME" ) + "/Applications/opiemail" ); |
289 | 286 | ||
290 | QStringList imap = dir.entryList( "smtp-*" ); | 287 | QStringList imap = dir.entryList( "smtp-*" ); |
@@ -297,62 +294,40 @@ QString SMTPaccount::getUniqueFileName() | |||
297 | 294 | ||
298 | void SMTPaccount::read() | 295 | void SMTPaccount::read() |
299 | { | 296 | { |
300 | Config *conf = new Config( getFileName(), Config::File ); | 297 | Config *conf = new Config( getFileName(), Config::File ); |
301 | conf->setGroup( "SMTP Account" ); | 298 | conf->setGroup( "SMTP Account" ); |
302 | accountName = conf->readEntry( "Account" ); | 299 | accountName = conf->readEntry( "Account" ); |
303 | server = conf->readEntry( "Server" ); | 300 | server = conf->readEntry( "Server" ); |
304 | port = conf->readEntry( "Port" ); | 301 | port = conf->readEntry( "Port" ); |
305 | ssl = conf->readBoolEntry( "SSL" ); | 302 | ssl = conf->readBoolEntry( "SSL" ); |
306 | login = conf->readBoolEntry( "Login" ); | 303 | login = conf->readBoolEntry( "Login" ); |
307 | user = conf->readEntry( "User" ); | 304 | user = conf->readEntry( "User" ); |
308 | password = conf->readEntryCrypt( "Password" ); | 305 | password = conf->readEntryCrypt( "Password" ); |
309 | useCC = conf->readBoolEntry( "useCC" ); | ||
310 | useBCC = conf->readBoolEntry( "useBCC" ); | ||
311 | useReply = conf->readBoolEntry( "useReply" ); | ||
312 | name = conf->readEntry( "Name" ); | ||
313 | mail = conf->readEntry( "Mail" ); | ||
314 | org = conf->readEntry( "Org" ); | ||
315 | cc = conf->readEntry( "CC" ); | ||
316 | bcc = conf->readEntry( "BCC" ); | ||
317 | reply = conf->readEntry( "Reply" ); | ||
318 | signature = conf->readEntry( "Signature" ); | ||
319 | signature = signature.replace( QRegExp( "<br>" ), "\n" ); | ||
320 | } | 306 | } |
321 | 307 | ||
322 | void SMTPaccount::save() | 308 | void SMTPaccount::save() |
323 | { | 309 | { |
324 | qDebug( "saving " + getFileName() ); | 310 | qDebug( "saving " + getFileName() ); |
325 | Settings::checkDirectory(); | 311 | Settings::checkDirectory(); |
326 | 312 | ||
327 | Config *conf = new Config( getFileName(), Config::File ); | 313 | Config *conf = new Config( getFileName(), Config::File ); |
328 | conf->setGroup( "SMTP Account" ); | 314 | conf->setGroup( "SMTP Account" ); |
329 | conf->writeEntry( "Account", accountName ); | 315 | conf->writeEntry( "Account", accountName ); |
330 | conf->writeEntry( "Server", server ); | 316 | conf->writeEntry( "Server", server ); |
331 | conf->writeEntry( "Port", port ); | 317 | conf->writeEntry( "Port", port ); |
332 | conf->writeEntry( "SSL", ssl ); | 318 | conf->writeEntry( "SSL", ssl ); |
333 | conf->writeEntry( "Login", login ); | 319 | conf->writeEntry( "Login", login ); |
334 | conf->writeEntry( "User", user ); | 320 | conf->writeEntry( "User", user ); |
335 | conf->writeEntryCrypt( "Password", password ); | 321 | conf->writeEntryCrypt( "Password", password ); |
336 | conf->writeEntry( "useCC", useCC ); | ||
337 | conf->writeEntry( "useBCC", useBCC ); | ||
338 | conf->writeEntry( "useReply", useReply ); | ||
339 | conf->writeEntry( "Name", name ); | ||
340 | conf->writeEntry( "Mail", mail ); | ||
341 | conf->writeEntry( "Org", org ); | ||
342 | conf->writeEntry( "CC", cc ); | ||
343 | conf->writeEntry( "BCC", bcc ); | ||
344 | conf->writeEntry( "Reply", reply ); | ||
345 | conf->writeEntry( "Signature", | ||
346 | signature.replace( QRegExp( "\\n" ), "<br>" ) ); | ||
347 | conf->write(); | 322 | conf->write(); |
348 | } | 323 | } |
349 | 324 | ||
350 | 325 | ||
351 | QString SMTPaccount::getFileName() | 326 | QString SMTPaccount::getFileName() |
352 | { | 327 | { |
353 | return (QString) getenv( "HOME" ) + "/Applications/opiemail/smtp-" + file; | 328 | return (QString) getenv( "HOME" ) + "/Applications/opiemail/smtp-" + file; |
354 | } | 329 | } |
355 | 330 | ||
356 | NNTPaccount::NNTPaccount() | 331 | NNTPaccount::NNTPaccount() |
357 | : Account() | 332 | : Account() |
358 | { | 333 | { |