Exforsys
+ Reply to Thread
Results 1 to 8 of 8

problems using php mail function

This is a discussion on problems using php mail function within the PHP forums, part of the Programming Talk category; Hi, I was trying to write a php form to give users the possibility to send me feedbacks about my ...

  1. #1
    falco85 is offline Junior Member Array
    Join Date
    Apr 2006
    Answers
    18

    problems using php mail function

    Hi,
    I was trying to write a php form to give users the possibility to send me feedbacks about my site. In order to do this I am using the php mail function, but I cannot make it work. The code seems fine but I simply don't receive any email when testing it. The script was tested by a friend of mine as well but he can make it work. What's wrong with my site then? Thank you


  2. #2
    iatbm's Avatar
    iatbm is offline Member Array
    Join Date
    Apr 2006
    Answers
    34

  3. #3
    mtajim is offline Junior Member Array
    Join Date
    Apr 2006
    Answers
    22
    First See ur Server configuration whether Php mail function is enabled or not. The problem might be there


  4. #4
    cbdarts is offline Member Array
    Join Date
    Apr 2006
    Answers
    40
    The biggest problem with this will be your outgoing Mail server. I recommend you test it on a different Host, or some one which has an outgoing (SMTP) server on the same server as the Web Server (IIS/Apache).

    Thats what I do - btw heres my sample script.

    HTML Code:
    <?
    $recvmail="contact@cbdarts.com";
    $subject="from".$_REQUEST['SenderName'];
    $headers= "From:".$_REQUEST['SenderEmail']."\n";
    $headers.='Content-type: text/html; charset=iso-8859-1';
    mail($recvmail, $subject,  "
    <html>
    <head>
     <title>Contact letter</title>
    </head>
    <body>
    
    <br>
      ".$_REQUEST['ContactDetails']."
    </body>
    </html>" , $headers);
    echo ("Your message was successfully sent!");
    ?>
    <script language="javascript">
    	alert("Thank you for your comments. We will contact you shortly.");
    	history.go(-1)
    </script>
    <center>
    	<h1>Thank you for your comments. We will contact you shortly.</h1>
    	<h3>Please click the back button on your browser to continue browsing our website.</h3>
    	<input type="button" onclick="history.go(-1)" value="< Back"/>
    </center>



  5. #5
    cyrus is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    128
    falco85 is problem with mail solved. If so how resolved it.Kindly share it out in this discussion so that it would be useful for other members. If your problem is not yet resolved post the exact problem or code where you are facing the problem and we would try to resolve it out here.


  6. #6
    Jansen is offline Junior Member Array
    Join Date
    Sep 2007
    Answers
    1
    I have the following problem;

    My companies website (PHP on MySQL Server) uses the standard mail function to send email messages to a number of mail addresses. The emails sent to addresses with the same domain-part as the website do not arrive. Yet the emails to email addresses outside our domain do arrive.

    Our hosting provider is unable to fix this. The obvious workaround by forwarding the received email from the address outside back to an address within our domain works. But is an eye sore in the architecture and I would love to resolve this.

    Thoughts anyone? Any help is hugely appreciated.


  7. #7
    karan0786 is offline Junior Member Array
    Join Date
    Apr 2008
    Answers
    2

    Question PHP form not working in gmail

    Hello friend to discuss a problem with you all actually I am using one php feedback form in my site which is developed by one of my friend.But that is not working.Actually two of expierenced PHP developers have checked that form and they said that coding is 100% right.Actually it is not working with gmail and rediff and hotmail and in yahoo it is coming in bulk folder.I have tried other gmail addresses but it is not working in that just working in yahoo's bulk folder not coming in its inbox.I dont know what is the actual problem my friends are telling that ,that form is working right with them and theri gmail address.I have checked that form in two different servers of different hosting companies.but in both I am not getting mail.Can anyone please help me.Any help ????I will be really grateful to you.......Pleaseeeeee
    Thanks in advance....


  8. #8
    Mideen is offline Software Programmer Array
    Join Date
    Oct 2008
    Location
    India
    Answers
    3
    ur server problem ask ur server admin to check the mail server


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...