summaryrefslogtreecommitdiffabout
authorulf69 <ulf69>2004-08-10 22:46:12 (UTC)
committer ulf69 <ulf69>2004-08-10 22:46:12 (UTC)
commit02d51ae409a353d3a79e976c26ccc1f652e55de8 (patch) (unidiff)
tree54d7a9f1eecd2ef9c3332f2bc22ff6ac6d9af335
parentdc81e96e29f619c6eb32c3ed18ff45b789c8504e (diff)
downloadkdepimpi-02d51ae409a353d3a79e976c26ccc1f652e55de8.zip
kdepimpi-02d51ae409a353d3a79e976c26ccc1f652e55de8.tar.gz
kdepimpi-02d51ae409a353d3a79e976c26ccc1f652e55de8.tar.bz2
final changes on how to send emails to selected contacts
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp26
1 files changed, 10 insertions, 16 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index d6f0cee..6610288 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -467,5 +467,9 @@ void KABCore::sendMail()
467 467
468void KABCore::sendMail( const QString& email ) 468void KABCore::sendMail( const QString& emaillist )
469{ 469{
470 bool result = ExternalAppHandler::instance()->mailToContacts(email); 470 // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... "
471 if (emaillist.contains(",") > 0)
472 ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null );
473 else
474 ExternalAppHandler::instance()->mailToOneContact( emaillist );
471} 475}
@@ -485,16 +489,5 @@ void KABCore::mailVCard( const QStringList& uids )
485 489
486 QString tmpdir = locateLocal("tmp", KGlobal::getAppName()); 490// QString tmpdir = locateLocal("tmp", KGlobal::getAppName());
487 491
488/*US 492 QString dirName = "/tmp/" + KApplication::randomString( 8 );
489 // Create a temp dir, so that we can put the files in it with proper names
490 KTempFile tempDir;
491 if ( tempDir.status() != 0 ) {
492 kdWarning() << strerror( tempDir.status() ) << endl;
493 return;
494 }
495
496 QString dirName = tempDir.name();
497 tempDir.unlink();
498*/
499 QString dirName = tmpdir + "/" + KApplication::randomString( 8 );
500 493
@@ -515,2 +508,3 @@ void KABCore::mailVCard( const QStringList& uids )
515 QFile outFile(fileName); 508 QFile outFile(fileName);
509
516 if ( outFile.open(IO_WriteOnly) ) { // file opened successfully 510 if ( outFile.open(IO_WriteOnly) ) { // file opened successfully
@@ -531,3 +525,3 @@ void KABCore::mailVCard( const QStringList& uids )
531 525
532 bool result = ExternalAppHandler::instance()->mailAttachments(urls.join(", ")); 526 bool result = ExternalAppHandler::instance()->mailToMultipleContacts( QString::null, urls.join(", ") );
533 527