Link to home
Start Free TrialLog in
Avatar of lulon
lulonFlag for Spain

asked on

mail function in php

Hello,

What is needed when using the php function mail to send emails? Email server? Is there any option to use one free? What are the best options?

Thanks in advance.
Avatar of karoldvl
karoldvl
Flag of Poland image

Normally it's using the local mailer (sendmail).

See the requirements here:
http://www.php.net/manual/en/mail.requirements.php

and runtime configuration:
http://www.php.net/manual/en/mail.configuration.php

Most of the time you use the mailer on the server you're hosting your website on. Try it and see if it works - it should run without any further configuration.
Avatar of lulon

ASKER

Note: I'm using Ubuntu
Then I assume you're having problems sending e-mails using the PHP mail() function on your localhost, yes?
Avatar of lulon

ASKER

I haven't even tried yet. I have the code and I know it works cause it has been tested but not in my computer.
ASKER CERTIFIED SOLUTION
Avatar of gilbertocortez
gilbertocortez

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lulon

ASKER

I will try to configure it.

But, do you normally have to have any kind of contract or similar with your ISP in order to be able to send emails to another accounts? Is it normally free or does it cost money?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mehul_Panchal
Mehul_Panchal

hi ,


mail function working when smtp server is there.so you have mail server then you can implement this and see email.