473,799 Members | 3,101 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

php mail() function does nothing

Hey everyone,

We've got FreeBSD 5.3, with Sendmail running. All we want to do is to
get sendmail to send emails to another server for actual outbound
email. We've got a very basic php script which utilizes the mail()
function, but for some reason, sendmail is never getting the command
from PHP.

So, we can successfully send email using sendmail from the command
prompt, but when it comes to using the PHP mail() function, nothing
happens. Not even an error message from PHP.

We have in our php.ini a direct path all the way to sendmail
configured. I'm at a loss as to why PHP mail() isn't even spitting
back an error. The maillog shows nothing from PHP.

Are there any variables, extensions that need to be compiled, etc to
make mail() work?

Thanks!!

Sep 19 '05 #1
1 1913
tencip:

We have in our php.ini a direct path all the way to sendmail
configured. I'm at a loss as to why PHP mail() isn't even spitting
back an error. The maillog shows nothing from PHP.

Are there any variables, extensions that need to be compiled, etc to
make mail() work?


Did you set sendmail_from? That may be it as well. Also perform a
trace of sendmail when PHP goes to send an email.

Also note from the manual:
" For the Mail functions to be available, PHP must have access to the
sendmail binary on your system during compile time. If you use another
mail program, such as qmail or postfix, be sure to use the appropriate
sendmail wrappers that come with them. ... Also, the user that compiled
PHP must have permission to access the sendmail binary."

Try recompiling and making sure that the user you compiled under has
access to sendmail.
--
Mike Willbanks
Zend Certified Engineer
http://www.digitalstruct.com
Sep 20 '05 #2

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

Similar topics

5
3109
by: Bruce W...1 | last post by:
In my effort to learn PHP I'm playing with some simple email scripts. They worked a few days ago but they stopped working. The only thing I've done to this Windows 2000 PC in this time was a Windows Update which I do regularly. The only part of this update that might be related was an IE 6 update. So I uninstalled and reinstaled PHP 4.3.3. The mail server setting is correct in the php.ini file. But email is still not being sent. ...
1
3665
by: tencip | last post by:
Hi everyone, Our setup: PHP 4.3.11, FreeBSD 5.3 RELEASE, Sendmail 8.1, 1 host environment, 2 jails. Our problem: While we can send email from the command line just fine in one of the jails, we cannot use the php mail() command to send email using sendmail at all. The function, when executed, does absolutely nothing. No error, no reports to the maillog, nothing.
8
5483
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
2
1367
by: Tempy | last post by:
Hi All, i am succesfully e-mailing a report as an excel attachment with a macro from a form that reflects people that are behind with there work but i have to manually type in thier e-mail addressess, however i would like to automate this so that the responsible people can automatically be detected and the e-mail with attachment must be sent to them. I hope i have made this clear enough. I am not a programmer, but a dabbler, so an...
3
2308
by: Programmer | last post by:
Hi all I wan't to know if i'm able to read mail from a mail server. My mail server is a pop3 server (UNIX) and i want to be able to get the mails from an aspx or an asmx. with out using external objs. Only classes from the .NET Is there a way?? Thanks in advance
4
1871
by: Brett | last post by:
I'd like any references to code that demonstrates how to download email messages from a mail server strictly through VB.NET. I'd also like to split each message into seperate components such as: - header - return path - to - from - subject - folder it was downloaded from
34
18277
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow "127.0.0.1". 4. Authentication: "Anonymous access" only. 5. Outbound connection listen to TCP 25. Besides,
1
6860
by: maxxxxel | last post by:
Hi Can anyone help me with some asp code , I changed the code to use CDO.message instead of the old cdont.sys to send mail from a ASP webpage which works fine. Our problem is that when we send mail externally to a internet email site like Gmail the PDF is sent but is corrupted because CDOSYS ends up using binary encoding rather than Base64 encoding when creating the attachment. More information here: Anthonys Code My knowledge of ASP...
1
1349
by: zhang | last post by:
what's the problem?? Remote_Addr = "hotmail.com" sFrom = "<makefriend8@" & Remote_Addr + ">" Dim oConnection As New TcpClient() Try oConnection.SendTimeout = 3000 oConnection.Connect(mserver, 25) ' msserver is right for
0
9688
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
9546
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,...
0
10490
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10030
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
9078
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...
1
7570
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6809
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();...
0
5467
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4146
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

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.