473,473 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Using /usr/bin/mail instead of sendmail?

Hi all,

Because of a chroot jail a web site that I'm working on is in (I don't
know much about the jail stuff), I can't use sendmail to send email
through a PHP script. The sys admin said he's put a copy of the basic
unix mail into the jail that I can use.

Now I assume I can use this by just doing a shell_exec, but for some
reason, I get no result out of it. If I run mail at command line
(without the variable names), it works great.

Can anyone suggest how I can approach this situation? Thanks!!

$output = shell_exec("echo $body | mail -s \"$subject\" $to");
print ("$output");
Jul 16 '05 #1
1 10737
I would ask the admin (if this is possible) to adjust your PHP configuration
and change the SMTP Server setting to specify mail rather than sendmail,
this way you can address the mail server through the mail() command and
transfer your code elsewhere with less worries.

HTH
Mike
"ratlhead" <ra******@ratlhead.com> wrote in message
news:fd**************************@posting.google.c om...
Hi all,

Because of a chroot jail a web site that I'm working on is in (I don't
know much about the jail stuff), I can't use sendmail to send email
through a PHP script. The sys admin said he's put a copy of the basic
unix mail into the jail that I can use.

Now I assume I can use this by just doing a shell_exec, but for some
reason, I get no result out of it. If I run mail at command line
(without the variable names), it works great.

Can anyone suggest how I can approach this situation? Thanks!!

$output = shell_exec("echo $body | mail -s \"$subject\" $to");
print ("$output");

Jul 16 '05 #2

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

Similar topics

0
by: Wayno | last post by:
Hoping someone can help me out with this problem. First problem, is I am unable to view my php error log. In my php.ini I have my log in /var/www/logs/php_error_log. However, it has remained empty....
6
by: Edo van der Zouwen | last post by:
I have the following problem. On a website there's a (simple) feedback form. This is used also by Polish visitors who (of course) type Polish text using special characters. However, when I...
3
by: vishal | last post by:
i am getting following error. Warning: mail() : Failed to connect to mailserver at "smtp.gmail.com" port 465, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in...
4
by: Jim Hammond | last post by:
It would be udeful to be able to get the current on-screen values from a FormView that is databound to an ObjectDataSource by using a callback instead of a postback. For example: public void...
1
by: saravanakumar | last post by:
Hi How to send email in php without using mail() ? Let me know the methods used to send intranet (local email) in php - somas
32
by: andresj | last post by:
I was doing some programming in Python, and the idea came to my mind: using fractions instead of floats when doing 2/5. The problem arises when you try to represent some number, like 0.4 in a...
5
by: serena9131 | last post by:
Dear all, I having problem for sending subject in cheses language using mail(), Can anyone let me know how to send send non unicode subject ? Thanks Serena
3
by: maheswaran | last post by:
Hi I have a basic doubt. Why we are not using tcp instead of http? for example http://www.yahoo.com to tcp://www.yahoo.com What is the difference and usage both of this?
24
by: Chris F.A. Johnson | last post by:
On 2008-07-09, Denis McMahon wrote: If the left-hand column contains any text, use em rather than px to size it. In CSS, less is more. Most problems are caused by specifying too much rather...
1
by: swetha123 | last post by:
hello, can any tell me how to send mails from site using mail() in php do we need to change in the php.ini these are in php.ini
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...
0
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...
0
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.