Error using sendmail (line 175)
显示 更早的评论
I've tried almost everything that's already on here but I keep getting the same error. I've allowed less secure apps on my gmail and allowed POP and IMAP. Even using outlook does not work. Turning off my firewall seems to have no effect
For reference I'm using: https://www.mathworks.com/matlabcentral/fileexchange/20227-send-email-to-gmail-account. I have eddited the details so that they are correct for my account. I've tried changing the port to 587 and used other solutions on MATLAB Answers.
It is always:
Error using sendmail (line 175)
Could not connect to SMTP host: smtp.gmail.com, port: 587; (Or 465 when I try that port)
Connection refused: connect
I understand that a few people have had similar problems but none of the solutions work for me.
Many Thanks
回答(1 个)
Cris LaPierre
2019-4-1
编辑:per isakson
2019-4-2
0 个投票
You do have to allow less secure apps access to your google account, but it sounds like maybe you've already done that?
This post contains some of these details as well with links.
10 个评论
Devon Dayah
2019-4-2
编辑:Devon Dayah
2019-4-2
Cris LaPierre
2019-4-2
Do you use 2-step verification on your google account?
Devon Dayah
2019-4-3
编辑:Devon Dayah
2019-4-3
Cris LaPierre
2019-4-3
No. I was wondering if that might be the problem since that might have been a reason why sendmail wasn't working.
Devon Dayah
2019-4-4
编辑:Devon Dayah
2019-4-4
Cris LaPierre
2019-4-4
Share your code. Otherwise we can't move beyond this point. Be sure to remove any of your account details first.
Devon Dayah
2019-4-4
编辑:Devon Dayah
2019-4-4
Cris LaPierre
2019-4-4
Sorry to report your code works for me. It does mean there's nothing wrong with the code, though.
At this point, I'd just be guessing why you are getting the error. Perhaps try reaching out to your ISP or google to see if they can see why your requests are not going through?
Devon Dayah
2019-4-5
编辑:Devon Dayah
2019-4-5
Devon Dayah
2019-5-8
类别
在 帮助中心 和 File Exchange 中查找有关 Web Services 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!