Hello i am working windows 7 and online server. I want that the visitor send me a mesaj from contact form but when i click the submit button a problem occurs.
this is my controller;
public function ilet(){
$name = $this->input->post("name");
$email = $this->input->post("email");
$message = $this->input->post("message");
$config = array(
"protocol" => "smtp",
"smtp_host" => "smtp.gmail.com",
"smtp_port" =>"587",
"smtp_user" =>"dcugurel7@gmail.com",
"smtp_password" =>"*******",
"starttls" =>true,
"charset" =>"utf-8",
"mailtype" =>"html",
"wordwrap" => true,
"newline" =>"\r\n",
);
$this->load->library("email", $config);
$this->email->from("cugurel7@gmail.com");
$this->email->to("cugurel7@gmail.com");
$this->email->subject("Müşteri bilgi mesajı");
$this->email->message("Kişinin Adı - " . $name .
" - Kişinin Email Adresi - " . $email . " - Kişinin Mesajı - " . $message);
$send = $this->email->send();
if($send)
{
echo "Mail gönderme işlemi başarılı";
}
else {
echo "Başarısız<br>;";
echo $this->email->print_debugger();
}
}
bu when i click to submit button server says that ;
220 smtp.gmail.com ESMTP y189-v6sm1286718wmd.19 - gsmtp hello: 250-smtp.gmail.com at your service, [185.85.237.26] 250-SIZE 35882577 250-8BITMIME 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-CHUNKING 250 SMTPUTF8 Failed to send AUTH LOGIN command. Error: 530 5.7.0 Must issue a STARTTLS command first. y189-v6sm1286718wmd.19 - gsmtp
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
Can you please help me how can i fix this?