The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mail() function can't send mails to the own domain

Discussion in 'E-mail Discussions' started by cyon, Mar 29, 2003.

  1. cyon

    cyon Well-Known Member
    PartnerNOC

    Joined:
    Jan 15, 2003
    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    16
    hy guys..

    I've a very strange problem. one of my clients wants submit some stuff per mail() to the adress of the forwarder and a copy of the mail to info@hisdomain.com.

    the mail reaches the 'extern' address but the copy to his own adress info@hisdomain.com disappears in nirvana. Exim creates the following:

    =====================
    This message was created automatically by mail delivery software (Exim).

    A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:

    pe***@gmx.ch
    SMTP error from remote mailer after RCPT TO:<pe***@gmx.ch>:
    host mx0.gmx.de [213.165.64.100]: 550 {mx026-rz3} <pe***@gmx.ch>... User is unknown

    ------ This is a copy of the message, including all the headers. ------

    Return-path: <nobody@server1.cy**.ch>
    Received: from nobody by server1.cy**.ch with local (Exim 3.36 #1)
    id 18zM56-0002Zr-00; Sat, 29 Mar 2003 20:33:10 +0100
    To: pe***@gmx.ch
    Subject: Kontakt von http://www.pe***.ch
    From: Formmailer <info@pe***.ch>
    cc: p***@hisdomain.com, [doesn't work] db@cy**.ch [works fine]
    Message-Id: <E18zM56-0002Zr-00@server1.cy**.ch>
    Date: Sat, 29 Mar 2003 20:33:10 +0100

    blabla..

    ============================

    I really don't know what the problem is and how to fix it..

    Thx for any help!

    David Burkardt
     
  2. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
  3. chrisben

    chrisben Member

    Joined:
    Feb 6, 2003
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sydney, Australia
    <?php
    if ($state == "")
    {
    $title="PhpMail";
    $header="Send An Email";
    $announce="Type A Message! (HTML Message and Multiple Attachments {with small modifications} Possible)";
    }
    else
    {
    $title="PhpMail";
    $header="Your Message Sent!";
    $announce="Send Another Email...";
    if ($ccText != "") $ccText="cc: $ccText <$ccText>\n";
    if ($bccText != "") $bccText="Bcc: $bccText <$bccText>\n";
    if ($mailformat == "Text") mail($toText, $subjectText, $msgText, "To: $toText <$toText>\n" . "From: $fromText <$fromText>\n" .$ccText.$bccText. "X-Mailer: PHP 4.x");
    if ($mailformat == "Html") mail($toText, $subjectText, $msgText, "To: $toText <$toText>\n" . "From: $fromText <$fromText>\n" .$ccText.$bccText. "MIME-Version: 1.0\n" . "Content-type: text/html; charset=iso-8859-1");
    }

    ?>

    <html>

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title><?php echo($title)?></title>
    </head>

    <body link="#0000ff" alink="#0000ff" vlink="#0000ff" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">

    REPLACE THIS LINE WITH YOUR CUSTOMISED HTML CONTENT LIKE NAVIGATION BAR (HEADER PART)

    <b><font face="Arial" size="4" color="#000080"><?php echo($announce)?></font><font face="Arial" size="3"><br>
    </font></b>
    <form method="POST" action="<?php echo($PHP_SELF)?>">
    <p><font face="Arial" size="3"><b>To: <input type="text" name="toText" size="35"></b></font></p>
    <p><font face="Arial" size="3"><b>Cc: <input type="text" name="ccText" size="35"></b></font></p>
    <p><font face="Arial" size="3"><b>Bcc: <input type="text" name="bccText" size="35"></b></font></p>
    <p><font face="Arial" size="3"><b>From: <input type="text" name="fromText" size="35"></b></font></p>
    <p><font face="Arial" size="3"><b>Subject: <input type="text" name="subjectText" size="46"></b></font></p>
    <p><font face="Arial" size="3"><b>Choose Email Format: </b></font>
    <font face="Arial" size="2">Plain Text <input type="radio" name="mailformat" value="Text"> HTML <input type="radio" name="mailformat" value="Html"></font>
    </p>
    <p><font face="Arial" size="3"><b>Message Text:</b></font></p>
    <p><font face="Arial" size="3"><b><textarea rows="11" name="msgText" cols="60"></textarea></b></font></p>
    <p><font face="Arial" size="3"><b><input type="submit" value="Send" name="send" style="font-family: Arial; font-size: 12pt; font-weight: bold"></b></font></p>
    <p>&nbsp;</p>
    <input type="hidden" name="state" value="1">
    </form>

    <h1> MATRIX SOLUTIONS: SECURITY AGENT:COIMBATORE</h1>

    </body>

    </html>


    Please use this, if it won't works then take off option in WHM , restrict mail from Nobody.

    Thanks
    Chris
    Firewall Security agent
    Matrix Solutions
    Coimabtore.
     
  4. cyon

    cyon Well-Known Member
    PartnerNOC

    Joined:
    Jan 15, 2003
    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    16
    thx alot, chrisben!
     
  5. tohi

    tohi Member

    Joined:
    Mar 19, 2003
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Ottawa, Canada
    I have the 'nobody' option unchecked and still cannot send message using the mail function. I have tried putting a From argument and still no luck! Anybody have the same problem?

    tohi
     
Loading...

Share This Page