===== VoiceXML Example : Vestec ===== **Record message to mail**
SMTPDebug =true; // Now you only need to add the necessary stuff $mail->IsSMTP(); //$mail->SMTPAuth = true; // enable SMTP authentication //$mail->SMTPSecure = "ssl"; // sets the prefix to the servier //$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server //$mail->Port = 465; // set the SMTP port for the GMAIL server //$mail->Username = "bsixto@gmail.com"; // GMAIL username //$mail->Password = "xxxxxx"; // GMAIL password //$mail->AddReplyTo("bsixto@gmail.com", "First Last"); //$mail->Host = "smtp.free.fr"; // sets GMAIL as the SMTP server //$mail->Port = 25; // set the SMTP port for the GMAIL server $mail->From = "marketing@i6net.com"; $mail->FromName = "i6net"; //$mail->AddAddress("isabel.desa@i6net.com", "Isabel"); $mail->AddAddress("borja.sixto@i6net.com", "Borja"); $mail->AddAddress("marketing@i6net.com", "i6net"); //$mail->AddAddress("pascal@davi.fr", "Pascal"); $mail->Subject = "Message : from ".$caller." to i6net"; $mail->Body = "A file is attached ("."mp3".")\n"; $mail->AddAttachment($outfile, $caller.".mp3"); if(!$mail->Send()) { readfile("error.vxml"); exit; } } } readfile("goodbye.vxml"); ?> The VoiceXML browser will record a message and post it with multipart encoding. The PHP script get the recording, convert it locally to MP3 and send an email with the audio file attached. Download : [[http://links.i6net.com/vxml_examples/messagebox/record.vxml|record.vxml]] [[http://links.i6net.com/vxml_examples/messagebox/send.php.txt|send.php]]