473,385 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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.localdomain"

But NOT $to = "so*****@some.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
Jul 17 '05 #1
6 10227
can you post a bit more of your code?

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"Sumith Bandula" <su****@cse.mrt.ac.lk> wrote in message
news:7a*************************@posting.google.co m...
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.localdomain"

But NOT $to = "so*****@some.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

Jul 17 '05 #2
Mike Bradley wrote:
can you post a bit more of your code?


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

if (mail("su****@cse.mrt.ac.lk", "test", "test", "From:
su****@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
Jul 17 '05 #3
"Sumith Bandula" <su****@cse.mrt.ac.lk> wrote in message
news:7a*************************@posting.google.co m...
It GOES $to = "me@localhost.localdomain"

What about php.ini and variable "sendmail_from"?

uncle Ramp
Jul 17 '05 #4
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" <su****@cse.mrt.ac.lk> wrote in message news:7a*************************@posting.google.co m...
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.localdomain"

But NOT $to = "so*****@some.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
Jul 17 '05 #5
"onu Ramp" <imeloom%20hot.ee> wrote in message news:<40*********************@diablo.uninet.ee>...

What about php.ini and variable "sendmail_from"?

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
Jul 17 '05 #6
su****@cse.mrt.ac.lk (Sumith Bandula) wrote in message news:<7a*************************@posting.google.c om>...
<?php
if (mail($to, $sub, $message, $from))
echo "sent mail successfully<br>\n";
?>
It GOES $to = "me@localhost.localdomain"
But NOT $to = "so*****@some.other.domain">
Please help me to solve it out.


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
Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: lawrence | last post by:
We're installing a new server at the office and this will be the first server we set up from which we host our website. We got tired of dealing with Interland and decided to bring our hosting...
2
by: Babaloo | last post by:
Hello, I am having a problem with PHP 4.2.2 and RH 8. PHP is working fine except email. I have a test script to send mail, I have sendmail_path = '/usr/lib/sendmail -t -i' set in php.ini,...
0
by: Aaron Powell | last post by:
I am writing a program for a study I am doing where I must contact several different organisations stored in a database I compiled, but I need to send each email one at a time so they don't know...
4
by: jim | last post by:
Hello, I am having a problem w/SendMail reporting: " No recipient addresses found in header". Funny thing is though, I properly recieve the email message. Thanks for your help. -jim
2
by: mike | last post by:
I've spent a couple of days on this and I'm to the "bang-my-head 'gainst the monitor and babble in tongues" mode. First - SuSE Pro 9.3, Linux 2.6.11.4-21.7, Apache 2.0.53, PHP 4.3.10 I have...
1
by: James Robertson | last post by:
Issue is that I really do not know diddly. Copying and trying to learn as much as I can about VB and ASP2.0. Now the question I have is I created an E-Mail form the sendmail properties in the VB...
3
by: swangdb | last post by:
I have a Sun Server running Solaris 10 and Sendmail 8.13.7. I have Majordomo and Listproc installed on this server and they work. I have several production majordomo and listproc mailing lists...
4
by: Nilesh | last post by:
I have a server in which sendmail gives problem. How do i change php.ini so that i can use exim for mail() System is FC-6.
4
by: Clodoaldo | last post by:
I need to know if an email was refused for whatever reason, it makes no difference. The email is sent to an email address that does not exist in a foreign domain. I can see in the postfix log...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.