If I understand correctly what you're doing, something like this might work (untested code):
int edge_cmp_function(const void *a, const void *b)
{
Edge *temp_a = (Edge *)a;
Edge *temp_b = (Edge *)b;
int result = 0;
if ((result = node_cmp_function(temp_a->from_email, temp_b->from_email)) == 0)
{
result = node_cmp_function(temp_a->to_email, temp_b->to_email);
}
return result;
}