CiviCRM Forums
News: Check the CiviCRM Blog for updated information on CiviCRM
 
*
Welcome, Guest. Please login or register. August 28, 2008, 09:04:40 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: civicrm_mailing with thunderbird  (Read 1609 times)
TrAshiBa
I’m new here
*

Karma: 3
Offline Offline

Posts: 5


View Profile
« on: April 30, 2007, 06:55:11 am »

Hello everybody,

I made a thunderbird extension and It is interesting to share what I have developed.

This extension uses 2 civiCRM API "crm_get_groups" and "crm_get_group_contacts".

First, it will search all the groups and smart groups existing in the Data Base.
And then for each selected groups/smart groups, it displays members' email address in CC or BCC.
There are custom "toolbarbutton" and "menuitem"

You have to configure the URL to the php file which makes a request. ( Mailing > Change URL ) and add the code below in the end of the SoapServer.php file ( ../civicrm/CRM/Utils/ )

Edit: You can modify the "civicrm_mailing.js" file in the "preferences" directory too.

Code:
//public function search_group_contacts_tb($key, $param){
public function search_group_contacts_tb($param){
//$this->verify($key);

$params = array( 'title' => $param );

//$return_properties = array('id', 'title' );
$return_properties = array('title' );
$myGroups =& crm_get_groups($params, $return_properties);

foreach($myGroups as $group) {
$return_properties = array( 'email' );
$sort = array("email" => "ASC");

        $myContacts =& crm_get_group_contacts(&$group, $return_properties ,'Added',$sort, $offset = 0, $row_count = 25 );

foreach ($myContacts as $contact) {
            $display .= $contact->email . ", ";
        }
}
return $display;
}

The package are available here : ZIP format or XPI format

Note that the authentication is disabled and a "bug" is known.

Email addresses are duplicate or 3 times, it is not for all the email addresses but it is very strange.
I don't think it was in my JS code.

I joined a screen shot too Smiley

Any feedback and suggestions are welcome.
« Last Edit: May 01, 2007, 01:12:04 am by TrAshiBa » Logged
Michał Mach
Administrator
I post frequently
*****

Karma: 25
Offline Offline

CiviCRM: trunk
CMS: Drupal latest
MySQL: 5.0.51b
PHP: 5.2.6

Posts: 348



View Profile WWW
« Reply #1 on: April 30, 2007, 07:27:02 am »

Yay, that's pretty cool. :-)

I'm going to install the extension and check it out sometimes in next two weeks, will come back with remarks.

Thanks for making your work available to others!

Thx,
michau
Logged
TrAshiBa
I’m new here
*

Karma: 3
Offline Offline

Posts: 5


View Profile
« Reply #2 on: April 30, 2007, 12:06:03 pm »

Yay, that's pretty cool. :-)
 
I'm going to install the extension and check it out sometimes in next two weeks, will come back with remarks.

Thanks for making your work available to others!

Thx,
michau

I am looking forward for your remarks Smiley


PS:

I got a problem when I want to edit my first post.
It returns the error message:

Code:
Database Error: Lost connection to MySQL server during query
File: /home/civicrm.org/forum/Sources/Post.php
Line: 1423

I just want to correct my bad english  Embarrassed ( I saw 3 faults Sad ) and add that the server's URL can be changed in the "civicrm_mailing.js" file in the "preferences" directory.

best regards
« Last Edit: April 30, 2007, 03:02:35 pm by Michał Mach » Logged
Michał Mach
Administrator
I post frequently
*****

Karma: 25
Offline Offline

CiviCRM: trunk
CMS: Drupal latest
MySQL: 5.0.51b
PHP: 5.2.6

Posts: 348



View Profile WWW
« Reply #3 on: April 30, 2007, 12:56:55 pm »

Uh oh... Not good, this error doesn't look nice. I checked SMF support forums and there is a few potential reasons for this behaviour, need to check all of them.

Can you please see if it happens again and let me know if it persists?
Logged
TrAshiBa
I’m new here
*

Karma: 3
Offline Offline

Posts: 5


View Profile
« Reply #4 on: April 30, 2007, 01:06:57 pm »

Can you please see if it happens again and let me know if it persists?

Do you change some thing ?

The same error message is displayed.  And the 'preview' before 'post' works fine ! ;-)
Logged
Michał Mach
Administrator
I post frequently
*****

Karma: 25
Offline Offline

CiviCRM: trunk
CMS: Drupal latest
MySQL: 5.0.51b
PHP: 5.2.6

Posts: 348



View Profile WWW
« Reply #5 on: April 30, 2007, 03:07:14 pm »

There is some wierd SMF error showing up when editing a message with attachment. Note, that you should be able to edit any other message without problem.

I tried all the suggestions that I've found on SMF support forum, without success, so I've posted a support request there - lets see what they say.

michau
Logged
Michał Mach
Administrator
I post frequently
*****

Karma: 25
Offline Offline

CiviCRM: trunk
CMS: Drupal latest
MySQL: 5.0.51b
PHP: 5.2.6

Posts: 348



View Profile WWW
« Reply #6 on: April 30, 2007, 03:17:53 pm »

Aha! While waiting for SMF forum registration email, I investigated a little bit more and it worked this time! :-) Cool

Some SQL queries in SMF didn't have proper quotes in them - some say it's a mysql bug, some say it's mysql feature, I say - it was breaking post editing. :-)

It should be fixed now.

michau
Logged
TrAshiBa
I’m new here
*

Karma: 3
Offline Offline

Posts: 5


View Profile
« Reply #7 on: May 01, 2007, 01:13:30 am »

Aha! While waiting for SMF forum registration email, I investigated a little bit more and it worked this time! :-) Cool

Some SQL queries in SMF didn't have proper quotes in them - some say it's a mysql bug, some say it's mysql feature, I say - it was breaking post editing. :-)

It should be fixed now.

michau

Nice michau Smiley

It works fine Smiley  ==> post edited :p
Logged
micheas
I’m new here
*

Karma: 0
Offline Offline

Posts: 2


View Profile
« Reply #8 on: July 20, 2008, 01:09:47 am »

Has any thing happened with this extension?

It could be a very nice selling point for civicrm.
Logged
Donald Lobo
Administrator
I’m (like) Lobo ;)
*****

Karma: 121
Offline Offline

CiviCRM: 2.0,2.1,2.2
CMS: Drupal 6.5, Joomla 1.5
MySQL: MySQL 5.0.67
PHP: PHP 5.2.6

Posts: 3143


View Profile WWW
« Reply #9 on: July 20, 2008, 02:35:17 pm »


I dont think so, but would be great if someone steps up and ensures it works with CiviCRM 2.x and potentially uses our new "Email2Activity" script (http://civicrm.org/node/406) to attach the email in CiviCRM Smiley

lobo


Logged

Using CiviCRM for donor management? Vote for CiviCRM at at NTEN Survey: http://www.surveymonkey.com/s.aspx?sm=IyoKNSWjxs882CDPlpAlwA_3d_3d
dflasse
I post occasionally
**

Karma: 0
Offline Offline

Posts: 35


View Profile
« Reply #10 on: July 21, 2008, 11:45:50 pm »

It doesn't work with version 2.0. The CiviCRM APIs have changed and we don't have the resources (no developer) to fix it. We found a workaround using a mailing list server (sympa.org). Emails meant to be distributed are sent to the sympa server who looks into the civicrm db to who the mail needs to be sent (each distribution list match a query). This allows us to use any mail client and we don't need the plugin anymore. Furthermore, it's easier to perform a change in the queries (in case of a DB structure change) than to modify the plugin's code.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM