want to send mail using php and WAMP SERVER

A

Anonymous

Guest
well .. i have WAMP SERVER 2.1 and creating a simple website locally in which i m trying to send email by using a simple mail() function .. here is my simple code ..

here m using the same email address at TO and FROM ..
----------------------
<?php

$to = "MYEMAIL@MYWEBSITEDOMAIN.COM";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "MYEMAIL@MYWEBSITEDOMAIN.COM";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";

?>
----------------------

but after running my script .. m getting this error message ..


----------------------
Warning: mail() [function.mail]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. n8sm5561110pbh.89 in
----------------------

well .. as far as m concerned .. i did all the SMTP settings by going into PHP.INI .. here is my PHP.INI

SETTLED MY smtp =
SETTLED MY smtp_port =
SETTLED MY sendmail_from = MYEMAIL@MYWEBSITEDOMAIN.COM
my sendmail_path is blank ..

and i uncommented the first three..

yet m getting this error

----------------------
Warning: mail() [function.mail]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. n8sm5561110pbh.89 in
----------------------
as i mentioned above ..

can anybody tell me how to fix this problem as i want to send mail locally using my WAMP SERVER 2.1 ..

please help me ..

thank you ..
 
Hi,

You need a SMTP service installed locally.

If you have access to a hosting server, try it there...

--
Jorge
Live Help on Skype: lets.talk.about.help
(languages: english, portuguese)
 
Back
Top