Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: Email problem.

  1. #1
    Regular Coder saeed's Avatar
    Join Date
    Oct 2002
    Location
    West Yorkshire
    Posts
    343
    Thanks
    32
    Thanked 0 Times in 0 Posts

    Email problem.

    I download the following script from some website. did some alterations. I want a contact us form on my website. Everything seems fine but am not receiving any email.

    am not at php coder at all.
    Kindly have a look at the code below and tell me where am going wrong ...

    Additionally, I've got index.php some text and i've include contactus_a01.php

    thanks,

    Saeed.

    ssconfig.php
    PHP Code:
    $to="saeednagaria@gmail.com";
    $contact_us_text="Contact Form";
    $your_text=".";
    $sent_message="Your message has been sent!";
    $small_text="(fill in the fields and press submit)";
    $contact_page="index.php"
    contactus_a01.php
    PHP Code:
    <?
    include 'ssconfig.php';
    $h='http://www.';$r='reconn.us';
    $text_string="<b>".$contact_us_text."</b> ".$your_text;
    $subject=$_POST['nume']." completed the contact us form!";
    $k='class';$k1='ifieds';$k2=' php';
    if(
    $_SERVER['REQUEST_METHOD']=='POST')
        {
            
    $msg="Contact us form completed:\n";
            
    $msg.="1. Name :".$_POST['nume']."\n";
            
    $msg.="2. E-mail:".$_POST['email']."\n";
            
    $msg.="3. Web:".$_POST['website']."\n";
            
    $msg.="3. Message:"$_POST['mesaj']."\n";
            
    mail$to$subject$msg,"From:".$_POST['nume']." <".$_POST['email'].">\nX-Sender: <".$_POST['email'].">\nX-Priority: 1\nReturn-Path: <".$_POST['email'].">\nContent-Type: text/html; charset=iso-8859-1\n" );
            echo 
    '<table border= "0" cellpadding = "0" cellspacing="0" width="400" class="contact_us"><tr><td><div align=center class="contact"><table align=center><tr><td height=280>';
            echo 
    '<p class="sent_message">'.$sent_message.'</p></td></tr></table></div></td></tr></table>';
            }
        else
            {
            
    ?>
            <table width="400" class="contact_us" cellpadding="0" cellspacing="0"><tr><td><div class="contact">
            <?php echo $text_string ?><br><font size="1" face="Geneva, Arial, Helvetica, sans-serif">
                            
            <?php echo $small_text ?></font><br><br>
              <form name="form1" method="post" action= <?php echo basename($PHP_SELF); ?> >
              <table width=100% cellspacing="0" class="form_fonts">
                <tr>
               <td>Your Name</td>
               <td><input name="nume" type="text" id="nume" size="40" maxlength="255" class="inputs" onfocus="this.className='inputs-focus';" onblur="this.className='inputs';"></td>
            </tr>
            <tr>
               <td>Your E-mail</td>
               <td><input name="email" type="text" id="email" size="40" maxlength="255" class="inputs" onfocus="this.className='inputs-focus';" onblur="this.className='inputs';"></td>
               </tr>
            <tr>
               <td>Your Website</td>
               <td><input name="website" type="text" id="website" size="40" maxlength="255" class="inputs" onfocus="this.className='inputs-focus';" onblur="this.className='inputs';"></td>
           </tr>
               <tr>
               <td valign="top"><font size="2" face="Geneva, Arial, Helvetica, sans-serif">Comments</font></font></td>
               <td>
               <textarea name="mesaj" cols="37" rows="5" id="mesaj" class="inputs" onfocus="this.className='inputs-focus';" onblur="this.className='inputs';"></textarea></td>
               </tr>
           </table>
               <p align="center">
               <input name="Submit" type="image" src="submit_a01.gif" border="0" value="Submit">
               <input type="image" src="reset_a01.gif" name="Submit2" value="Reset" onclick="this.form.reset();return false;">           
               </p>
                <DIV style="BORDER-TOP: 0px; OVERFLOW-Y: scroll; OVERFLOW-X: hidden; OVERFLOW: scroll; BORDER-LEFT: 1px; WIDTH: 100%; SCROLLBAR-ARROW-COLOR: #003366; BORDER-BOTTOM: 1px; BORDER-RIGHT-STYLE: none; SCROLLBAR-BASE-COLOR: #aebed8; HEIGHT: 1px"> 
                    <?php
                    $l
    =$h.$r;
                    echo 
    '<a href="'.$l.'">'.$k.$k1.$k2.'</a>'.$l;
                    
    ?>
                    </DIV>
           </form>
        </div></td></tr></table>
               <? 
               
    }
               
    ?>

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    What webhost are you trying this on?
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Regular Coder saeed's Avatar
    Join Date
    Oct 2002
    Location
    West Yorkshire
    Posts
    343
    Thanks
    32
    Thanked 0 Times in 0 Posts
    at the moment ... am using www.freehostia.com

  • #4
    Regular Coder saeed's Avatar
    Join Date
    Oct 2002
    Location
    West Yorkshire
    Posts
    343
    Thanks
    32
    Thanked 0 Times in 0 Posts
    thts strange ... I upload all the files to another server and its working alrite.


    donno whts wrong with this web host.

  • #5
    Regular Coder GO ILLINI's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    634
    Thanks
    0
    Thanked 7 Times in 7 Posts
    The webhost may not support all the options in the 'headers' section of the main() function. Also the host may have some rule such as 'The mail must be sent from a certain email address.' As it is a free host support will be limited, but if you contact them, they might be able to help you.
    Why not thank me?

    http://adamsworld.name

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Freehostia's free hosting account disables any outgoing mail connections hence why its not working meaning no mail() function or no sendmail function either will work.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •