SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast utbeastie's Avatar
    Join Date
    Feb 2005
    Location
    Houston, Texas
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mail Server Issue with PHP

    I have a simple PHP E-mail Form on my site. The form does not work on a certain e-mail address (I tested it with other e-mail addresses on different servers and my gmail account and the form works fine).

    Is this a mail server problem or a server issue. Any ideas??
    Thanks.

  2. #2
    SitePoint Wizard silver trophy Jelena's Avatar
    Join Date
    Feb 2005
    Location
    Universum, 3rd Corner
    Posts
    3,000
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Can we see the code that sends email?

    Anyway, try to set the envelope sender address within additional parameters like
    mail("somebody@domain.com", "subject", "message", null, "-fyou@yourdomain.com");
    -- Jelena --

  3. #3
    SitePoint Enthusiast utbeastie's Avatar
    Join Date
    Feb 2005
    Location
    Houston, Texas
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is the code:

    PHP Code:
    <?php 
    $FROM
    ="Customer";
    $txtName=$_POST['txtName']; 
    $txtPhone=$_POST['txtPhone']; 
    $txtEmail=$_POST['txtEmil']; 
    $txtAddress=$_POST['txtAddress']; 
    $txtCity=$_POST['txtCity']; 
    $txtState=$_POST['txtState']; 
    $txtComments=$_POST['txtComments']; 
    $chkPast=$_POST['chkPast']; 
    $chkOnline=$_POST['chkOnline']; 
    $chkFriend=$_POST['chkFriend']; 
    $chkYellow=$_POST['chkYellow']; 
    $chkOther=$_POST['chkOther']; 
    $txtOther=$_POST['txtOther']; 
    $to="cmw@covantagedesigns.com"//your email address goes on this line 
    $message
    "<h2><b>Contact ASG</h2></b><p>
    <b>Name:</b> 
    $txtName</br> 
    <b>Phone:</b> 
    $txtPhone<br> 
    <b>E-mail:</b> 
    $txtEmail<br> 
    <b>Address:</b> 
    $txtAddress<br> 
    <b>City:</b> 
    $txtCity<br> 
    <b>State:</b> 
    $txtState<p> 

    <b>Comments:</b><br> 
    $txtComments<p> 

    <b>How did you find us?</b><br> 
    $chkPast<br> 
    $chkOnline<br> 
    $chkFriend<br> 
    $chkYellow<br> 
    $chkOther<br> 
    $txtOther"

    $header =
    "From: $FROM\r\n" .
    "MIME-Version: 1.0\r\n".
    "Content-Type: text/html; charset=utf-8\r\n".
    "Content-Transfer-Encoding: 8bit\r\n\r\n";
    mail($to,"ASG Contact Us Form",$message,$header);
    echo 
    '<span class=style7>Thank you for contacting us. An e-mail has been sent to our staff and we will respond shortly.</span>';//your thank you note goes here
    ?>


Bookmarks

Posting Permissions

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