473,233 Members | 1,402 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,233 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 10223
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.