Codeigniter Отправить почту с Gmail SMTP на LocalHostPhp

Кемеровские программисты php общаются здесь
Ответить
Anonymous
 Codeigniter Отправить почту с Gmail SMTP на LocalHost

Сообщение Anonymous »

Я знаю, что этот вопрос имеет пару дубликатов, но я думаю, что я пробовал их все. Br />$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'smtp.gmail.com',
//'smtp_host' => 'localhost',
'smtp_port' => 465,
'mailpath' => 'C:\xampp\sendmail', // tried without sendmail
'smtp_user' => 'correct email',
'smtp_pass' => 'correct pass',
'mailtype' => 'html',
'charset' => 'utf-8',
'starttls' => true, // changing makes no difference
'smtp_crypto' =>'ssl', // tried without ssl on port 25 as wel, google not responding
'_smtp_auth' => true // tried removing this
);
$this->load->library('email', $config);
$this->email->from('', 'Tong-Il Neeroeteren'); //verzender (magic e-cards)
$this->email->to($email); //ontvanger
$this->email->subject($subject); //onderwerp toevoegen
//inhoud van het bericht met activatiecode als link.
$this->email->message($message);
if (!$this->email->send()) {
$errors = $this->email->print_debugger();
return false;
} else {
return true;
}
< /code>
Сообщение в $ ошибка всегда одинаково: < /p>
220 smtp.gmail.com ESMTP h11sm1190535ljh.15 - gsmtp

hello: 250-smtp.gmail.com at your service, [2a02:1810:9d16:bf00:eda1:6150:23ed:ba70]
250-SIZE 35882577
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
Failed to authenticate password. Error: 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/?p=BadCredentials h11sm1190535ljh.15 - gsmtp

from: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1 https://support.google.com/mail/?p=WantAuthError h11sm1190535ljh.15 - gsmtp
The following SMTP error was encountered: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1 https://support.google.com/mail/?p=WantAuthError h11sm1190535ljh.15 - gsmtp

to: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1 https://support.google.com/mail/?p=WantAuthError h11sm1190535ljh.15 - gsmtp
The following SMTP error was encountered: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1 https://support.google.com/mail/?p=WantAuthError h11sm1190535ljh.15 - gsmtp

data: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1 https://support.google.com/mail/?p=WantAuthError h11sm1190535ljh.15 - gsmtp
The following SMTP error was encountered: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1 https://support.google.com/mail/?p=WantAuthError h11sm1190535ljh.15 - gsmtp

502 5.5.1 Unrecognized command. h11sm1190535ljh.15 - gsmtp

The following SMTP error was encountered: 502 5.5.1 Unrecognized command. h11sm1190535ljh.15 - gsmtp

Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
User-Agent: CodeIgniter
Date: Mon, 10 Oct 2016 19:34:18 +0200
From: "Tong-Il Neeroeteren"
< /code>

to:
Субъект: =? UTF-8? Q? activeer_uw_account?
x-mailer: codeigniter
x-priority: 3 (нормальный)
message-id:
mime-версия: 1.0
Content-Type: multipart/alternative; boundary="B_ALT_57fbd11ad5b41"

This is a multi-part message in MIME format.
Your email application may not support this format.

--B_ALT_57fbd11ad5b41
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

// Too much info

--B_ALT_57fbd11ad5b41
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

// Too much info

--B_ALT_57fbd11ad5b41--
< /code>
my php.ini < /p>
[mail function]
SMTP=ssl://smtp.gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
mail.add_x_header=On
< /code>
и мой sendmail.ini < /p>
smtp_server=smtp.gmail.com
smtp_port=465
smtp_ssl=auto
auth_username=correct email
auth_password=correct password
force_sender=
< /code>
Я включил менее безопасный доступ и попробовал метод разблокировки captcha безрезультатно. > Я также не могу настроить, как настроить это после того, как он будет развернут в моем размещенном домене. Любая помощь будет оценена


Подробнее здесь: https://stackoverflow.com/questions/399 ... -localhost
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Php»