2017-10-19 96 views
0

我有一個來自ion_auth的註冊表單,當我發送表單時,出現一個我無法發送表單的錯誤。之後,谷歌向我發送一封電子郵件,有人想從我的帳戶發送的東西,被封...Google block CodeIgniter-Ion-Auth

$config['use_ci_email'] = TRUE; // Send Email using the builtin CI email class, if false it will return the code and the identity 
$config['email_config'] = array(
    'mailtype' => 'html', 
    'protocol' => 'smtp', 
    'smtp_host' => 'ssl://smtp.googlemail.com', 
    'smtp_port' => 465, 
    'smtp_user' => '[email protected]', // actual values different 
    'smtp_pass' => 'my password', 
    'charset' => 'utf-8', 
    'newline' => '\r\n', 
); 
+0

這只是因爲你的服務器!你可以嘗試像郵件 –

回答

0

你需要到您的電子郵件(在[email protected])帳戶,並從不夠安全的應用啓用訪問。當您登錄到您的Gmail帳戶並轉到那裏時,請轉到此地址:https://myaccount.google.com/lesssecureapps

+0

這樣的替代方法有另一種方法嗎?因爲如果我更改服務器(新IP)谷歌再次問我要確認....順便說一下,如果我不想要谷歌帳戶,我可以做些什麼?這項工作只與谷歌? –

+0

您打算更改IP的頻率是多少?這真的是一個問題嗎?您可以免費創建一個Google帳戶,它可以讓您每天發送2000封電子郵件。 '這項工作只適用於谷歌?' - 您的代碼可以與任何SMTP服務器一起使用。例如,您可以在雅虎創建賬戶,並使用他們的SMTP [設置](https://help.yahoo.com/kb/SLN4075.html),我不知道他們每天發送多少封郵件。 – Dmitry