Professional Web Applications Themes

Sendmail PHP integration problem - PHP Development

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 = "localdomain" But NOT $to = "other.domain" I use following configuration in php.ini sendmail_path = "sendmail -v -t -i" so I see "successfully 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 ...

  1. #1

    Default 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 = "localdomain"

    But NOT $to = "other.domain"

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

    so I see "successfully 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
    Sumith Guest

  2. #2

    Default 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" <mrt.ac.lk> wrote in message
    news:google.com... 


    CountScubula Guest

  3. #3

    Default Re: Sendmail PHP integration problem

    Mike Bradley wrote: 

    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("localdomain", "test", "test", "From:
    localdomain"))
    echo "Email 1 sent<br>\n";

    if (mail("mrt.ac.lk", "test", "test", "From:
    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
    Sumith Guest

  4. #4

    Default Re: Sendmail PHP integration problem

    "Sumith Bandula" <mrt.ac.lk> wrote in message
    news:google.com... 


    What about php.ini and variable "sendmail_from"?

    uncle Ramp


    onu Guest

  5. #5

    Default 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" <mrt.ac.lk> wrote in message news:google.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 = "localdomain"

    But NOT $to = "other.domain"

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

    so I see "successfully 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
    laidbak Guest

  6. #6

    Default Re: Sendmail PHP integration problem

    "onu Ramp" <imeloom%20hot.ee> wrote in message news:<4019ecf3$0$172$uninet.ee>... 
    As I know "sendmail_from" 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
    Sumith Guest

  7. #7

    Default Solved => Re: Sendmail PHP integration problem

    mrt.ac.lk (Sumith Bandula) wrote in message news:<google.com>... 

    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.your.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
    Sumith Guest

Similar Threads

  1. sendmail relay problem
    By Harry in forum Sun Solaris
    Replies: 4
    Last Post: August 14th, 03:04 PM
  2. php <-> sendmail problem
    By in forum PHP Development
    Replies: 3
    Last Post: August 2nd, 12:19 PM
  3. rpm -i sendmail problem
    By Wenjie in forum Linux Setup, Configuration & Administration
    Replies: 5
    Last Post: July 29th, 12:35 AM
  4. Sendmail problem in AIX 4.3.3
    By subhasbothra in forum AIX
    Replies: 1
    Last Post: July 19th, 08:09 AM
  5. sendmail problem
    By zico in forum Linux / Unix Administration
    Replies: 0
    Last Post: July 18th, 10:21 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139