echo("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n"); // The name of your mail server $mailer = "wap.colorline.no"; // Format the from field $from = $from." (WAP user at ".$mailer.")";
// Add the from field and some character handling to the extra headers $extraheaders = $from."\nContent-Type: text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: 8bit";
// Start sending out the WML deck echo("<wml>\n"); if(mail($to,$subject,$body,$extraheaders)) {// Use PHP's internal mail functionality // Mail was successfully sent echo("<card id=\"sent\" title=\"Mail sent\">\n"); echo("<p>Mail was sent successfully</p>\n"); echo("</card>\n"); } else { // The mail could not be sent echo("<card id=\"notsent\" title=\"Mail failed\">\n"); echo("<p>Unable to send mail</p>\n"); echo("</card>\n"); } echo("</wml>\n"); ?>