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

Mail help

Discussion in 'Plesk for Linux - 8.x and Older' started by lueung, May 21, 2006.

  1. lueung

    lueung Guest

    Hi I'm running fedora3 linux, plesk 7.54. My problem is when I send mail from this function:

    function mailing($to,$name,$from,$subj,$body) {
    global $SERVER_NAME;
    $recipient = $to;
    $headers = "From: " . "$name" . "<" . "$from" . ">\n";
    $headers .= "User-Agent: Mail/1.0.0\n";
    $headers .= "MIME-Version: 1.0\n";
    $headers .= "X-Sender: <" . "$to" . ">\n";
    $headers .= "Return-Path: <" . "$to" . ">\n";
    $headers .= "Error-To: <" . "$to" . ">\n";
    $headers .= "Content-Type: text/html;charset=utf-8\n";
    $headers .= "Content-Transfer-Encoding: 8bit\n";
    $headers .= "X-Priority: 3 (Normal)\n";
    $headers .= "Importance: Normal\n";

    function form_get($value){
    return addslashes_deep($get_value);
    function addslashes_deep($value) {
    $value = is_array($value) ?
    array_map('addslashes_deep', $value) :
    return $value;

    I get a failure notice:

    Hi. This is the qmail-send program at ns1.liteholdings.com.
    I'm afraid I wasn't able to deliver your message to the following addresses.
    This is a permanent error; I've given up. Sorry it didn't work out.

    <lueung@ureach.com>: failed after I sent the message.
    Remote host said: 553 5.7.0 Sender lueung@ureach.com not allowed

    --- Below this line is a copy of the message.

    Return-Path: <lueung@ureach.com>
    Received: (qmail 9143 invoked by uid 48); 21 May 2006 07:38:49 -0400
    Date: 21 May 2006 07:38:49 -0400
    Message-ID: <20060521113849.9141.qmail@ns1.liteholdings.com>
    To: lueung@ureach.com
    Subject: Please join me at this site
    From: zea zea <admin@friendsforcash.com>
    User-Agent: Mail/1.0.0
    MIME-Version: 1.0
    X-Sender: <lueung@ureach.com>
    Error-To: <lueung@ureach.com>
    Content-Type: text/html;charset=utf-8
    Content-Transfer-Encoding: 8bit
    X-Priority: 3 (Normal)
    Importance: Normal

    I hope you`ll try out a new service I joined. You can connect with my friends, invite yours, post
    listings, and join<br />
    groups. It`s fun, it`s easy, and it`s addictive -- because it works. Let me know what you think.<br
    <br />
    To check it out, click the Web link below. (If this link doesn`t work, copy it into your
    browser.)<br />
    <br> Please use this tag:<a

    When I use this script script below to test it works send fine:

    This is a script, written and designed to test the functionality of the
    PHP mail() function on a web hosting account. I offer no warrenty with
    this script. Anyone can use and distribute the script freely.

    <head><title>PHP Mail() test</title></head>

    This form will attempt to send a test email. Please enter where this test should be sent to<br><p>
    <form action = "sendmail.php" method = "post" name="sendmail">
    Enter an email address: <input type = "text" name = "to"><br>
    <input type="submit" value="Send" name="submit"><input type="reset" value="Reset" name="reset"><br><p>


    $host = $_SERVER['HTTP_HOST'];
    $uri = $_SERVER['SCRIPT_URI'];
    $mail_subject="Test email from $host";
    $mail_body="This is a test email, sent from $uri";
    $header = "Content-type: text/html\n";
    $header .= "From: \"PHP mail() Test Script\"<noreply@$host>\n";

    if(mail($mail_to, $mail_subject, $mail_body,$header))
    print "Email sent successfully!<img src=\"http://dubovik.us/happygir.jpg\">";
    print "Email did not send<img src=\"http://dubovik.us/madgir.jpg\">";


    This is the header:

    Return-Path: <anonymous@ns1.liteholdings.com>
    Received: from ns1.liteholdings.com (ns1.liteholdings.com [])
    by ureach.com (8.12.9/8.12.9) with ESMTP id k4LAnN3h020609
    for <lueung@ureach.com>; Sun, 21 May 2006 06:49:23 -0400
    Received: (qmail 8311 invoked by uid 48); 21 May 2006 06:49:23 -0400
    Date: 21 May 2006 06:49:23 -0400
    Message-ID: <20060521104923.8309.qmail@ns1.liteholdings.com>
    To: lueung@ureach.com
    Subject: Test email from www.friendsforcash.com
    Content-type: text/html
    From: "PHP mail\(\) Test Script" <noreply@friendsforcash.com>

    Anyone have any ideas how to resolve this issue?:confused: