Error php mail() function...
Posted: Tue Jun 23, 2009 7:21 am
Hi,
I've installed on my system php 5, apache 2.2, QK SMTP server.
I use the following code on my page:
contact.php page has the following code:
I've configured my gmail account with Thunderbird as now all message I receive through gmail, also enter in my Thunderbird account too. A few details about my Thunderbird account configuration(I don't know if these are really important):
The php.ini configuration page looks like:
These are the codes and configuration settings and the problem is that when I hit the submit button in my form the contact.php page apears and it does even say: "Your mail was sent successfully", but I don't get a message in my email account and the QK SMTP server shows the following error:
//Messaje FROM:<example@gmail.com>TO: <example@gmail.com> directly fail! Connect fail: Socket Error # 10060 Connection timed out. Wait for retry...//
I tried several times but I don't know what could be wrong.
Please help me if you know what can cause this.
Thanks.
I've installed on my system php 5, apache 2.2, QK SMTP server.
I use the following code on my page:
Code: Select all
//
<form method="post" action="contact.php">
Email: <input name="email" type="text"><br>
Message:<br>
.textarea name="message" rows="15" cols="40"></textarea><br>
<input type="submit">
.form>
//
Code: Select all
//
$to = "example@gmail.com";
$subject = "Contact Us";
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
$headers = "From: $email";
$sent = mail($to, $subject, $message) ;
if($sent)
print "Your mail was sent successfully";
else
print "We encountered an error sending your mail";
//
Code: Select all
Server Settings
{
server type: IMAP Mail server;
server name: imap.gmail.com;
user name: example@gmail.com;
port:993
}
Outgoing server(SMTP)
{
server name: smtp.gmail.com
user name: example@gmail.com;
port:25
}
Code: Select all
//
[mail function]
; For Win32 only.
SMTP = localhost (I've also tried "smtp.gmail.com", without succes)
smtp_port = 25
; For Win32 only.
sendmail_from = example@gmail.com (I've also tried another email address, without succes)
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
//
//Messaje FROM:<example@gmail.com>TO: <example@gmail.com> directly fail! Connect fail: Socket Error # 10060 Connection timed out. Wait for retry...//
I tried several times but I don't know what could be wrong.
Please help me if you know what can cause this.
Thanks.