Howdy -

I'm trying to write some C that adds an email address to an existing
EContact; here's what I've got:

EContact* ev_contact = E_CONTACT(get_contact());
EVCardAttribute* attr = e_vcard_attribute_new (NULL, EVC_EMAIL);
e_vcard_attribute_add_param_with_value (attr, e_vcard_attribute_param_new 
(EVC_TYPE), "WORK");
e_vcard_attribute_add_param_with_value (attr, e_vcard_attribute_param_new 
(EVC_X_DEST_EMAIL), "[EMAIL PROTECTED]");
GList* email_attrs = g_list_append(NULL, attr);
e_contact_set_attributes (ev_contact, E_CONTACT_EMAIL, email_attrs)

That doesn't seem to do the trick, though... I must be doing something
wrong.  I've looked around the source code for a bit but I only seem to
be able to find examples of importing via the VCard format.  

Any help would be appreciated,

Thanks,

Tom

_______________________________________________
evolution-hackers maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/evolution-hackers

Reply via email to