Re: [Evolution-hackers] Setting up mailing list contact?



ping?  team?

On Wed, 2004-02-11 at 15:51 +0800, Not Zed wrote:

> Lads,
> 
> I'm trying to setup a contact list, but i'm not sure what format to do
> it in/or have i hit a bug.
> 
> If i set the email addresses as rfc822 addresses (simple strings is all
> i've tried so far), as a list on a normal contact, they show up fine
> (well, the first 3 do).
> 
> But if i set E_CONTACT_IS_LIST on the list, i get xml errors:
> 
> Entity: line 1: error: Start tag expected, '<' not found
> foo bar baz foo net au
> etc
> 
> Bug?
> 
> While i'm at it, if i set E_CONTACT_FULL_NAME, do I have to set
> E_CONTACT_NAME to an EContactName as well.  If they're using the same
> source string, do i just have to do one of them?
> 
> And can you have a mailing list that references other contacts/lists, or
> must it include the full address?  (and how would one do it).
> 
> The code in question is a pine addressbook importer: 
> 
> 	e_contact_set(card, E_CONTACT_NICKNAME, strings[0]);
> 	e_contact_set(card, E_CONTACT_FULL_NAME, strings[1]);
> 
> 	addr = strings[2];
> 	len = strlen(addr);
> 	if (addr[0] == '(' && addr[len-1] == ')') {
> 		addr[0] = 0;
> 		addr[len-1] = 0;
> 		addrs = g_strsplit(addr+1, ",", 0);
> 		list = NULL;
> 		for (i=0;addrs[i];i++)
> 			list = g_list_append(list, addrs[i]);
> 		e_contact_set(card, E_CONTACT_EMAIL, list);
> 		g_strfreev(addrs);
> 		e_contact_set(card, E_CONTACT_IS_LIST, TRUE);
> 	} else {
> 		e_contact_set(card, E_CONTACT_EMAIL_1, strings[2]);
> 	}
> 
> 	/*name = e_contact_name_from_string(strings[1]);*/
> 
> 	if (strings[3] && strings[4])
> 		e_contact_set(card, E_CONTACT_NOTE, strings[4]);
> 
> _______________________________________________
> evolution-hackers maillist  -  evolution-hackers lists ximian com
> http://lists.ximian.com/mailman/listinfo/evolution-hackers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]