473,804 Members | 2,758 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 = "so*****@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
Jul 17 '05 #1
6 10246
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.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 = "so*****@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

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****@l ocalhost.locald omain", "test", "test", "From:
su****@localhos t.localdomain"))
echo "Email 1 sent<br>\n";

if (mail("su****@c se.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.goog le.com...
It GOES $to = "me@localhost.l ocaldomain"

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

What about php.ini and variable "sendmail_from" ?

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
Jul 17 '05 #6
su****@cse.mrt. ac.lk (Sumith Bandula) wrote in message news:<7a******* *************** ***@posting.goo gle.com>...
<?php
if (mail($to, $sub, $message, $from))
echo "sent mail successfully<br >\n";
?>
It GOES $to = "me@localhost.l ocaldomain"
But NOT $to = "so*****@some.o ther.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.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
Jul 17 '05 #7

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

Similar topics

4
7687
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 in-house. The guy doing most of the work struggled with sendmail for awhile and then gave up. Now he's installing Postit, or Postfix, or whatever it's called. Does the PHP mail function depend on sendmail, or can it use any mta software?
2
17185
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, sendmail can send mail from the command line but if I use the script I get the following error on the http log file:
0
2165
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 who else I sent to. I tested my sendmail and it works well, but I am having a problem with chomp in the case I am using it. When getting $email, if I do not say $email\n, nothing will be displayed to the command prompt. This leads me to believe...
4
4015
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
6360
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 sendmail running on the local server - mail from unix (1) mail and mutt work locally on the server. This is, specifically, sending mail to a localhost user or another user off on the net somewhere works fine.
1
2232
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 side are Imports System.Net.Mail Partial Class _Default Inherits System.Web.UI.Page Protected Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e
3
2476
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 installed on this server and they work. I am trying to get Mailman to work on this server and so far, no luck. I installed the software (Mailman 2.1.8 and Python 2.4.3), reconfigured mm_cfg.py, started the software, added the cron entries,...
4
5844
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
1800
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 that the email was sent and bounced with the error code 550. The problem is that sendmail should throw an exception but it does not. And the returned dictionary is empty as if the email was accepted.
0
9705
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9576
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10311
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10074
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9138
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4292
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3813
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2988
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.