Mail() and Exim

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ray

    Mail() and Exim

    Hi

    I am looking for some advise here... I am running php on RH9 Using Exim as a
    MTA which is used as my test enviroment.
    Problem is that when I send mail through php it is sent from
    nobody@mydomain .com and the email is converted to plain text which displays
    all the html..

    Is there a configuration setting in my php.ini that must be set...

    When I upload the scripts it works fine on the service providers side, but I
    need to get my setup working properly...

    Any advice out there??

    Thanks
    Ray

    Sample mail code..


    $info = nl2br($_POST['info']);
    $emailadd = $_POST['email'];


    $to = "webmaster@doma in.net";
    $subject = "Informatio n Request from Website";
    $from = $_POST['name']."<".$_POST['email'].">";
    $headers = "
    MIME-Version: 1.0\n
    From: $from\n
    Bcc: ray@domain.co.z a\n
    Reply-To: $emailadd\n
    Return-path: $emailadd\n
    Content-Type: text/html; charset=iso-8859-1\n
    X-Priority: 1\n
    X-MSMail-Priority: High\n
    X-Mailer: php\n";


    $message = "
    <html>\n
    <head></head>\n
    <body>\n
    <font size=\"2\" face=\"Arial\"> \n
    <b>Name and Surname : </b>".$_POST['name']."<br>\n
    <b>Office Phone : </b>".$_POST['officenum']."<br>\n
    <b>Home Phone : </b>".$_POST['homenum']."<br>\n
    <b>Cell : </b>".$_POST['cellnum']."<br>\n
    <b>Email : </b>".$emailadd." <br>\n
    <b>Info Requested :</b><br>\n
    $info\n
    </font>\n
    </body>\n
    </html>
    ";


    <?
    if(mail($to, $subject, $message, $headers)){
    ?> <br>
    Thank you for your interest.
    <p>Your request has been successfully transmitted.</p>
    <p>We will contact you as soon as
    possible. <br>
    <br>
    <br>
    </p>
    <?
    }else{
    ?>
    <p>There was an error transmitting your
    query. We apologise for the inconvience. </p>
    <p>Please <a
    href="mailto:em ail@email.com"> <font color="#FFFFFF" >contact us</font></a>
    for assistance. <br>
    </p>
    <hr>
    <?
    }
    ?>


Working...