1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

MTA qmail, different email handling

Discussion in 'Plesk for Linux - 8.x and Older' started by cyrus1u1, Jun 10, 2006.

  1. cyrus1u1

    cyrus1u1 Guest

    0
     
    Hi guys

    I wrote a script which sends email from a form --> formmailer.

    PHP:
    <?php
    $mdpass 
    "c003a894e29e413e42e1ac51527abc76";
    if(
    $_POST['sent'] == 2){
        if(
    md5($_POST['key']) == $mdpass){
            
    $emailsubject stripslashes($_POST['emailsubject']);
            
    $emailmessage stripslashes($_POST['emailmessage']);
            
    $emailheader "From: ".$_POST['emailfromshowname']." < ".$_POST['emailfromaddress']." >\n"
            
    $emailheader .= "Reply-to: ".$_POST['emailfromshowname']." <".$_POST['emailfromaddress'].">\n"
            
    $emailheader .= "Reply-path: ".$_POST['emailfromshowname']." <".$_POST['emailfromaddress'].">\n"
            
    $emailheader .= "MIME-Version: 1.0\n"
            
    $emailheader .= "Content-Type: text/plain\n"
            
    $emailheader .= "X-Sender: ".$_POST['emailfromaddress']."\n"
            
    $emailheader .= "X-Mailer: PHP/".phpversion()."\n"
            
    $emailheader .= "X-Priority: 3";
            
            
    mail($_POST['emailto'], $_POST['emailsubject'], $emailmessage$emailheader);
            echo 
    "email has been sent!";
        }else{
            echo 
    "email could not be sent!";
        }
    }else{
    ?>
    <form action="<? echo $php_self; ?>" method="POST">
    to:<br />
    <input type="text" name="emailto" size="20" /><br />
    <br />

    from address:<br />
    <input type="text" name="emailfromaddress" size="20" /><br />
    <br />

    from showname:<br />
    <input type="text" name="emailfromshowname" size="20" /><br />
    <br />

    subject:<br />
    <input type="text" name="emailsubject" size="20" /><br />
    <br />

    message:<br />
    <textarea rows="10" name="emailmessage" cols="30"></textarea><br />
    <br />
    <br />
    <br />
    key:<br />
    <input type="password" name="key" size="20" /><br />
    <br />
    <input type="hidden" name="sent" value="2" />
    <input type="submit" name="submit" value="send" />
    </form>
    <?
    } ?>
    Unfortunatly, only email adresses which aren't on the same server, receive the email correclty. E-Mail adresses which are configured in plesk/qmail on the same server as this formmail-script is, I get double-blank lines.

    e.g. entered text in form:
    --> received text on a email adress which is located on the same server:
    --> received text on a email adress which is located on a other server:
    Why is the MTA handling the outgoing email different? Or how can I fix the double blanklines?

    Thanks in advance for your help!
     
  2. huck

    huck Guest

    0
     
    We are investigating a similar issue for a client. A form to email script build by Sitebuilder corrupts the email when sending to a local account. The email contents come through but they are in HTML code. When sent to a remote account they are handled properly.
     
Loading...