Board index   FAQ   Search  
Register  Login
Board index System Administration Server installation and configuration

want to send mail using php and WAMP SERVER

Discuss server installationa nd configuration issues here

Moderators: macek, egami, gesf

want to send mail using php and WAMP SERVER

Postby mittul » Thu Jul 07, 2011 4:01 am

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 ..
mittul
New php-forum User
New php-forum User
 
Posts: 8
Joined: Thu Jul 07, 2011 3:32 am

Re: want to send mail using php and WAMP SERVER

Postby jorgepinho » Thu Jul 07, 2011 6:35 am

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)
jorgepinho
New php-forum User
New php-forum User
 
Posts: 101
Joined: Tue Jul 05, 2011 5:41 am
Location: Portugal


Return to Server installation and configuration

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.