I'm having a hard time to send a message to a certain e-mail account. I read that I should setup the PHP.INI at line where SMTP is located, which the default value is localhost. If the SMTP is to the computer itself which is 127.0.0.1 or localhost then the mail would be going nowhere. What value should be set for SMTP?

Hi, you should insert the address of the SMTP server which will deliver the mail, typically something like "smtp.yourisp.com".

If your SMTP server requires a password, or HTTPS, etc, you will need to look at something like SwiftMailer (http://swiftmailer.org/).

The "localhost" setting is for when your webserver, or the server running the PHP script, is a mail server as well.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.