Can't connect to mailserver, php.ini setting possibly wrong

2 replies
Joined: 11/26/2008
User offline. Last seen 2 weeks 3 days ago.

Hi, I'm running a new install of WAMPserver on a windows machine acting as localhost using PHPformmail Classic v1.07.2.

I had another problem with my php.ini that I was able to fix by searching in the forum, but I could not find the information I needed on this one (which cropped up when I fixed the other one).

when my form submits the data, phpformmail returns the error message:

Warning: mail() [function.mail]: 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\staab\formmail.php on line 451

I tried changing the SMPT from "localhost" to "gmail.com" (which is where I am trying to send the email), but that didn't do any good.

I'm kinda new to PHP and SMPT and such, so I'm really kinda clueless here. Would appreciate some help.

-Tim

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 11/26/2008
User offline. Last seen 2 weeks 3 days ago.

Just in case, you can find some of my project files here:

http://code.google.com/p/grizzlyfirestarters/downloads/list

the redirect in the form never gets used anyway so I thought I'd just leave it.

I'm using PHP version 5.2.6 and Apache version 2.2.8.

thanks,

-Tim

Joined: 11/26/2008
User offline. Last seen 2 weeks 3 days ago.

I just tried to use "smtp.gmail.com" to connect to the mailserver but that didn't work either:

Warning: mail() [function.mail]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. g31sm1610888rvb.7 in C:\wamp\www\staab\formmail.php on line 451

apparently gmail needs more authentication or something, I must be using the wrong server... but I don't really know what I'm doing :)

also see http://mail.google.com/support/bin/answer.py?answer=13287

User login