stream->write_function(stream,"-ERR Profile not found\n");
gotodone;
}else{
char*from;
char*headers,*header_string;
char*body;
intpriority=3;
switch_size_tretsize;
switch_time_exp_ttm;
chardate[80]="";
inttotal_new_messages=0;
inttotal_saved_messages=0;
inttotal_new_urgent_messages=0;
inttotal_saved_urgent_messages=0;
int32_tmessage_len=0;
char*p;
switch_time_tl_duration=0;
switch_core_time_duration_tduration;
charduration_str[80];
char*formatted_cid_num=NULL;
sql=switch_mprintf("SELECT * FROM voicemail_msgs WHERE username = '%q' AND domain = '%q' AND uuid = '%q' ORDER BY read_flags, created_epoch",id,domain,uuid);
body=switch_mprintf("%u second Voicemail from %s %s",message_len,switch_event_get_header(cbt.my_params,"VM-Message-Caller-Name"),switch_event_get_header(cbt.my_params,"VM-Message-Caller-Number"));