Will_S
Will_S

Reputation: 71

Sending PHP mail

I would like to send this email.

I have seen configuration but not sure what to do or make any heads or tails out of them. The mail would be sent from my PC right now.

Error I get is - Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\send.php on line 165.

http://www.cyberciti.biz/tips/howto-php-send-email-via-smtp-authentication.html http://forums.devshed.com/mail-server-help-111/how-to-set-up-php-ini-to-send-mail-from-106329.html

Looked on these two sites from google search but don't acutally understand it. Can some help me please.

Upvotes: 0

Views: 279

Answers (2)

jli
jli

Reputation: 6623

You don't have a mail server installed. You have a few options:

  1. Install a mail server such as Postfix or sendmail
  2. Connect to an existing SMTP server, for example through Gmail. (See: Send email using the GMail SMTP server from a PHP page)

Upvotes: 1

Paul Dessert
Paul Dessert

Reputation: 6389

You're trying to send mail from your localhost (Your PC) It's not setup to send mail. Move the script to a production server and it will work

Upvotes: 3

Related Questions