void free_to(struct message *msg){
	struct rcptto *top;
	struct rcptto *nextto;
	struct addheader *hp;
	struct addheader *nexth;

	if (msg->to == NULL)
		return;
	top = msg->to;
	while(top != NULL) {
			hp=top->header;
			while(hp != NULL) {
				nexth=hp->next;
				if (hp->subject != NULL) {
					free(hp->subject);
					hp->subject = NULL;
				}
				free(hp->header);
				free(hp);
				hp=nexth;
			}
		nextto = top->next;
		free(top->to);
		free(top);
		top = nextto;
	}
	msg->to = NULL;
}
