Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
| Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 11th, 2004, 11:09 AM
Authorized User
 
Join Date: Jul 2004
Location: rajshahi, , Bangladesh.
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rajuru Send a message via Yahoo to rajuru
Default Mail sending error

Dear,
I have an error page which automatically sends me a mail. Few days it worked well that mean i received mail when visitors requested wrong page. But now problem after I have changed something.
I don't receive any mail, as I have tested requesting wrong pages and the script does not show any message. When I echo variables it shows vales.
Here is my total php code of document.

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Inform webmaster about error</title>
<link rel="stylesheet" type="text/css" href="../styles-test.css">
</head>

<body style="background-color: #FFFFFF">
<table border="0" width="100%" style="border-collapse: collapse">
    <tr>
        <td width="107">
        <p align="center">
<img border="0" src="http://www.rubd.net/images/rubd.jpg" width="100" height="67"></td>
        <td>
        <p style="margin-left: 10px">&nbsp;</p>
        <div style="background-color: #99CCFF">
            <p style="margin-left: 10px">Page Not Found</div>
        <p style="margin-left: 10px">&nbsp;</td>
    </tr>
</table>

<?php
$reqlink= $_SERVER['REQUEST_URI'];
?>

<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center">Your requested page <?php echo "<b>$reqlink </b>" ; ?>was not found.
We apologize this inconvenience. Either there is an error in server or your have requested a
wrong page. We recommend to recheck address you typed. </p>
<p align="center">&nbsp;</p>
<p align="center">An email regarding this error has been sent to the
webmaster. We heartily welcome your further assistance to help us improve.</p>



<p>&nbsp;</p>
<p>&nbsp;</p>

<?php
//send email to webmaster

$mto="rubdnet@gmail.com";
$mfrom="webmaster@rubd.net";
$msubject="The document was not found";
$mmessage="The user request the page <b>$reqlink</b> which was not found <br>Refering Page: <b>$HTTP_REFERER</b>, Browser: <b>$HTTP_USER_AGENT</b>, Sender IP: <b>$REMOTE_ADDR</b>, Sender Host: <b>$REMOTE_HOST</b>" ;

/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

/* additional headers */
$headers .= "To: $mto\r\n";
$headers .= "From: $mfrom \r\n";
$headers .="Subject: $msubject \r\n";

/* and now mail it */
if (!$result=mail($mto, $msubject, $mmessage, $headers)) die();
?>

<p align="center">Contact:
<a href="contents/script/sendmail/compose.php?mailaddr=webmaster@rubd.net">
webmaster@rubd.net</a> </p>
</body>

</html>

pls. suggest me something

__________________
Best Regard:
Md. Zakir Hossain (Raju)

www.rajuru.xenexbd.com - my blog with PHP scripts, PHP Book Review and many more
 
Old October 15th, 2004, 08:26 AM
Authorized User
 
Join Date: Jul 2004
Location: rajshahi, , Bangladesh.
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rajuru Send a message via Yahoo to rajuru
Default

Is there anyone to help me?

Best Regard:
Md. Zakir Hossain (Raju)
Webmaster
www.rubd.net
 
Old October 18th, 2004, 10:19 PM
Registered User
 
Join Date: Jun 2004
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is there a specific PHP error message you are receiving? Is it simply not sending you emails? Have you recently changed anything in PHP.INI?

 
Old October 20th, 2004, 01:19 AM
Authorized User
 
Join Date: Jul 2004
Location: rajshahi, , Bangladesh.
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rajuru Send a message via Yahoo to rajuru
Default

Dear thanks for reply

I dont receive any error.

I cannot change php.ini becuase I bough some space from a hosting service provider.


Best Regard:
Md. Zakir Hossain (Raju)
www.rubd.net
www.xenex.rubd.net
www.forum.rubd.net




Similar Threads
Thread Thread Starter Forum Replies Last Post
Error when sending mail using the AjaxMail example MightyThor BOOK: Professional Ajax ISBN: 978-0-471-77778-6 3 June 23rd, 2006 04:11 AM
URGENT Error in sending mail qazi_nomi Classic ASP Basics 12 June 25th, 2004 07:42 PM
Urgent Error in sending mail qazi_nomi Classic ASP Components 1 June 11th, 2004 02:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.