Re: Email configuration

From: Date: Thu, 05 Feb 2009 13:27:26 +0000
Subject: Re: Email configuration
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-287704@lists.php.net to get a copy of this message
2009/2/5 It flance <itmaqurfe@yahoo.com>:
Hi all, I've installed php and mysql in fedora. Now i am able to create php programs. But when I am unable to use email in my programs. I am wondering what is the easiest way to use email in my php programs. Can i send email from my personal computer. I am a regular person connected to internet through an internet provider. Is there any preconfigured software or I have to go through the configuration of sendmail for example? Thank you
    
Sorry... But I need a _little_ bit more information. What operating system do you use? Linux/Windows/Mac/other? The main problem is that most of the big email providers don't accept mails from dialup connections, but there are solutions to work around this. For now start by telling me which operating system you have.
I think that the OP mentioned the word fedora somewhere above... To the point: Your linux probably has already installed the sendmail suite. If that is the case (run rpm -qa | grep sendmail to check) you may safely use the PHP's mail function for simple things. In case you don't have sendmail installed use: # yum install sendmail http://www.php.net/manual/en/function.mail.php If you need more advanced features like for e.g. adding attachments to your e-mails you may consider other options like phpmailer. I have never used it myself but many people that belong in this gang are very fond of it. http://phpmailer.codeworxtech.com/ Keep in mind that in case you have compiled PHP from source without having the sendmail installed you may need to recompile it. You can find this by making a phpinfo somewhere. In case you have installed from package no harm is done. Put this in a script: <?php phpinfo(); ?> You will find "sendmail_path" somethere in the resulting page or something like that "Path to sendmail". If this is set then everything will work like a charm. -- Thodoris

« previous php.general (#287704) next »