PHP Mail

How to enable mail for PHP ? What should I need to configure on my RedHat and PHP server ?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
If you mean the PHP mail() function, all you normally need is a 'sendmail' compatible SMTP server on that machine.  Note that mail() is a very simple minded function.  If you need any kind of authentication to an outside SMTP server, you may want to look at PHPMailer
Pallavi GodseSr. Digital Marketing ExecutiveCommented:
For a PHP mail function -
> mail() function sends mail directly from script
Mail configuration settings -
Name Default Description Changeable
SMTP "localhost" Windows only: The DNS name or IP address of the SMTP server PHP_INI_ALL
smtp_port "25" Windows only: The SMTP port number. Available since PHP 4.3 PHP_INI_ALL
sendmail_from NULL Windows only: Specifies the "from" address to be used in email sent from PHP PHP_INI_ALL
sendmail_path NULL Unix systems only: Specifies where the sendmail program can be found
(usually /usr/sbin/sendmail or /usr/lib/sendmail) PHP_INI_SYSTEM

Hope this will help you.
Ankit PareekOnline MarketingCommented:

To get the information about PHP mail() function you can check out these Links

I hope it will work for you
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Ray PaseurCommented:
You can learn about your PHP installation by running this script, shown here in its entirety.
<?php phpinfo();

Open in new window

You can search the output for your keywords, in this case, "mail" to see what your PHP settings contain.
AXISHKAuthor Commented:
Do I need to enable SMTP service on my local Linux ? There is not SMTP service available on the server.... ?
Just skip the mail() function in php. Use PHPMailer in combination of a good mailserver. Gmail for example is free.

PHPMailer uses any smtp you want with authentication and becouse your sending mails from the right smtp server for that domain. You will not be marked as spam.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AXISHKAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.