Need help $20 reward

Discussion in 'PHP' started by mikerocky, Aug 5, 2008.

  1. #1
    I need to get this survey working asap:

    http://www.themuseumexperience.com

    i need someone to rewrite the mail.php script to make this work.

    Please PM me if you can do this today

    thanks :)
     
    mikerocky, Aug 5, 2008 IP
  2. Le4rner

    Le4rner Active Member

    Messages:
    80
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #2
    I guarantee it is the headers man. Most email server will not accept email without certain headers these days.

    Typical mail funtion mistake:
    
    mail($to, $subject, $message);
    
    PHP:
    What you should have
    
    <?php
    $boundary = md5(uniqid(time()));
    $headers  = 'From: ' . $from . "\n";
    $headers .= 'To: ' . $to . "\n";
    $headers .= 'Return-Path: ' . $from . "\n";
    $headers .= 'MIME-Version: 1.0' ."\n";
    $headers .= 'Content-Type: multipart/alternative; boundary="' . $boundary . '"' . "\n\n";
    $headers .= $body_simple . "\n";
    $headers .= '--' . $boundary . "\n";
    $headers .= 'Content-Type: text/plain; charset=ISO-8859-1' ."\n";
    $headers .= 'Content-Transfer-Encoding: 8bit'. "\n\n";
    $headers .= $body_plain . "\n";
    $headers .= '--' . $boundary . "\n";
    $headers .= 'Content-Type: text/HTML; charset=ISO-8859-1' ."\n";
    $headers .= 'Content-Transfer-Encoding: 8bit'. "\n\n";
    $headers .= $body_html . "\n";
    $headers .= '--' . $boundary . "--\n"; 
    mail($to, $subject, $message, $headers);
    
    PHP:
    This works in hotmail and lotus notes. This should work for most email systems. YOu must have headers though. Telling who it is from, reply-to, return-path... Since the days of phishing scams servers have gotten stricter.
     
    Le4rner, Aug 5, 2008 IP
  3. LaZyBuM™

    LaZyBuM™ Peon

    Messages:
    183
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Work is done! Smooth deal done with mikerocky :)
     
    LaZyBuM™, Aug 5, 2008 IP