Re: RE: Quick PHP Revisited
| From: | sathya99 at cyberway dot com dot sg | Date: | Mon, 24 Jul 2000 16:00:15 +0000 |
| Subject: | Re: RE: Quick PHP Revisited | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7881@lists.php.net to get a copy of this message | ||
Hi everyone,
I am new to this mailing list and I am from Singapore. Presently I am
developing a Wap site where I need to do all a multiple check in mails. I
need some information on how it could be done.
Presently, I have this codes , can anyone advise me where to place this PHP
code in my server.
WML Code
<wml>
<card id="edit" title="Email Editor">
<p>From: <input type="text" name="from"
format="*M"/></p>
<p>To: <input type="text" name="to"
format="*M"/></p>
<p>Subject: <input type="text" name="subject"
format="*M"/></p>
<p>Message body: <input type="text" name="body"
format="*M"/></p>
<p>
<anchor>Send this mail
<go method="post"
href="http://some.host/mailhandler"?action=send/">
<postfield name="from" value="$(from)"/>
<postfield name="to" value="$(to)"/>
<postfield name="subject" value="$(subject)"/>
<postfield name="body" value="$(body)"/>
</go>
</anchor>
</p>
</card>
</wml>
<?
header("Content-type: text/vnd.wap.wml"); // Tell the
client that this is a WML deck
echo("<?xml version=\"1.0\"?>\n");
echo("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"
\"http://www.wapforum.org/DTD/wml_1.1.xml\">\n");
$mailer = "wap.colorline.no"; // The name
of your mail server
$from = $from." (WAP user at ".$mailer.")"; // Format the
from field
// 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";
echo("<wml>\n"); // Start
sending out the WML deck
if(mail($to,$subject,$body,$extraheaders)) { // Use PHP's
internal mail functionality
echo("<card id=\"sent\" title=\"Mail sent\">\n");
// Mail was
successfully sent
echo("<p>Mail was sent successfully</p>\n");
echo("</card>\n");
}
else {
echo("<card id=\"notsent\" title=\"Mail failed\">\n");
// The mail
could not be sent
echo("<p>Unable to send mail</p>\n");
echo("</card>\n");
}
echo("</wml>\n");
?>
Where shall I configure it to work normally
I hope that some kind souls will assist me.
Thanks
Sam