dtl19910708 2013-07-28 15:39
浏览 47

使用CodeIgniter通过Google帐户发送电子邮件

I'm trying to send emails with CodeIgniter using smtp.googlemail.com. No problems with code but Google is preventing me from sending that email - here's the email I received on my Google account:

A third party recently tried to use an application to connect to your Google account.

We blocked the connection attempt in case it would be a hacker trying to access your account.

If you have not made ​​this connection attempt, it may mean a third party is trying to access your account. We recommend that you log into your account and reset your password immediately. We blocked the connection attempt in case it would be a hacker trying to access your account.

If this is your account and if you are having trouble to get there, follow the troubleshooting procedure explained at http://support.google.com/mail?p=client_login.

I have followed the link and didn't find a solution.

  • 写回答

1条回答 默认 最新

  • duande9301 2015-11-18 15:39
    关注

    I have the same issue, got an email from Google saying "Sign-in attempt prevented" when I was trying the same. I am ignoring what you have received from google and the text of email. Finally I solved the issue to send mail using CodeIgniter Email library today.

    To use Google SMTP in CodeIgniter you need to make 2 (two) changes into Gmail account setting: (N.B. Please be aware that it is now easier for an attacker to break into your account -says Google)

    1. Set off 2-step Verification.
    2. Allow less secure apps: ON (or Enable)

    Now use 'smtp_host' as ssl://smtp.gmail.com instead of smtp.googlemail.com

    Hope this help.

    评论

报告相同问题?

悬赏问题

  • ¥15 matlab中使用gurobi时报错
  • ¥15 WPF 大屏看板表格背景图片设置
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂