Sendmail PHP integration problem

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

  • Sumith Bandula
    Guest replied
    Solved => Re: Sendmail PHP integration problem

    sumith@cse.mrt. ac.lk (Sumith Bandula) wrote in message news:<7aeb985.0 401282253.21c4f ac0@posting.goo gle.com>...[color=blue]
    > <?php
    > if (mail($to, $sub, $message, $from))
    > echo "sent mail successfully<br >\n";
    > ?>
    > It GOES $to = "me@localhost.l ocaldomain"
    > But NOT $to = "someone@some.o ther.domain">
    > Please help me to solve it out.
    >[/color]

    Finally I could solve it out. Thanks for all of you concern the
    problem. Here is the simple change I did for the benifit of others who
    might come across same type of problem.

    Just add following line to the end of sendmail.mc file mostly
    locateted in /etc/mail/

    Cwmachinename.y our.domain.name

    Note that 'Cw' at the begining of above line.
    Then run:

    make -C /etc/mail

    to reconfigure sendmail.cf. This might differ in different versions.

    Finally thanks to all of you again - SB

    Leave a comment:


  • Sumith Bandula
    Guest replied
    Re: Sendmail PHP integration problem

    "onu Ramp" <imeloom%20hot. ee> wrote in message news:<4019ecf3$ 0$172$bb624dac@ diablo.uninet.e e>...[color=blue]
    >
    > What about php.ini and variable "sendmail_from" ?
    >[/color]
    As I know "sendmail_f rom" and "SMTP" are useful only in Windows.

    I just commented it since I am using Linux.

    Anyhow I tried with few options of these values as well. But couldn't succeed - SB

    Leave a comment:


  • laidbak
    Guest replied
    Re: Sendmail PHP integration problem

    You need to check your PHP.ini and make sure the
    sendmail from variable is set to a valid address.
    _______________ _______________ ______
    Wil Moore III, MCP | Integrations Specialist | Senior Consultant
    DigitallySmooth Inc. | Quick Site Studio
    "Sumith Bandula" <sumith@cse.mrt .ac.lk> wrote in message news:7aeb985.04 01282253.21c4fa c0@posting.goog le.com...
    Hi all,
    I am using a simple php script to send a mail.

    <?php
    if (mail($to, $sub, $message, $from))
    echo "sent mail successfully<br >\n";
    ?>

    It GOES $to = "me@localhost.l ocaldomain"

    But NOT $to = "someone@some.o ther.domain"

    I use following configuration in php.ini
    sendmail_path = "sendmail -v -t -i"

    so I see "successful ly delevery acceptance" in both case at verbose
    messages.

    However I CAN SEND messages to BOTH address successfully USING
    telnet localhost 25

    So what I feel is sendmail configuration works properly. But there is
    a problem in interfacing sendmail and php.

    Please help me to solve it out.

    Thanks in advance - SB

    Leave a comment:


  • onu Ramp
    Guest replied
    Re: Sendmail PHP integration problem

    "Sumith Bandula" <sumith@cse.mrt .ac.lk> wrote in message
    news:7aeb985.04 01282253.21c4fa c0@posting.goog le.com...[color=blue]
    > It GOES $to = "me@localhost.l ocaldomain"[/color]


    What about php.ini and variable "sendmail_from" ?

    uncle Ramp


    Leave a comment:


  • Sumith Bandula
    Guest replied
    Re: Sendmail PHP integration problem

    Mike Bradley wrote:[color=blue]
    > can you post a bit more of your code?[/color]

    In my real program I use bit complex set of codes. However after
    realizing the problem I tested it with the given few lines of code. So
    I don't have any more codes for this, but here is my real lines of
    code.

    <?php
    if (mail("sumith@l ocalhost.locald omain", "test", "test", "From:
    sumith@localhos t.localdomain"))
    echo "Email 1 sent<br>\n";

    if (mail("sumith@c se.mrt.ac.lk", "test", "test", "From:
    sumith@cse.mrt. ac.lk"))
    echo "Email 2 sent<br>\n";
    ?>

    I get both "Email 1 sent" and "Email 2 sent" messages, but second mail
    doesn't delever.

    Anyhow I can send a mail to second address by TELNETing port 25.

    Thanks a lot for your concern - SB

    Leave a comment:


  • CountScubula
    Guest replied
    Re: Sendmail PHP integration problem

    can you post a bit more of your code?

    --
    Mike Bradley
    http://www.gzentools.com -- free online php tools
    "Sumith Bandula" <sumith@cse.mrt .ac.lk> wrote in message
    news:7aeb985.04 01282253.21c4fa c0@posting.goog le.com...[color=blue]
    > Hi all,
    > I am using a simple php script to send a mail.
    >
    > <?php
    > if (mail($to, $sub, $message, $from))
    > echo "sent mail successfully<br >\n";
    > ?>
    >
    > It GOES $to = "me@localhost.l ocaldomain"
    >
    > But NOT $to = "someone@some.o ther.domain"
    >
    > I use following configuration in php.ini
    > sendmail_path = "sendmail -v -t -i"
    >
    > so I see "successful ly delevery acceptance" in both case at verbose
    > messages.
    >
    > However I CAN SEND messages to BOTH address successfully USING
    > telnet localhost 25
    >
    > So what I feel is sendmail configuration works properly. But there is
    > a problem in interfacing sendmail and php.
    >
    > Please help me to solve it out.
    >
    > Thanks in advance - SB[/color]


    Leave a comment:


  • Sumith Bandula
    Guest started a topic Sendmail PHP integration problem

    Sendmail PHP integration problem

    Hi all,
    I am using a simple php script to send a mail.

    <?php
    if (mail($to, $sub, $message, $from))
    echo "sent mail successfully<br >\n";
    ?>

    It GOES $to = "me@localhost.l ocaldomain"

    But NOT $to = "someone@some.o ther.domain"

    I use following configuration in php.ini
    sendmail_path = "sendmail -v -t -i"

    so I see "successful ly delevery acceptance" in both case at verbose
    messages.

    However I CAN SEND messages to BOTH address successfully USING
    telnet localhost 25

    So what I feel is sendmail configuration works properly. But there is
    a problem in interfacing sendmail and php.

    Please help me to solve it out.

    Thanks in advance - SB
Working...