Error using sendmail (line 175)
Ältere Kommentare anzeigen
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
Antworten (1)
Cris LaPierre
am 1 Apr. 2019
Bearbeitet: per isakson
am 2 Apr. 2019
0 Stimmen
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 Kommentare
Devon Dayah
am 2 Apr. 2019
Bearbeitet: Devon Dayah
am 2 Apr. 2019
Cris LaPierre
am 2 Apr. 2019
Do you use 2-step verification on your google account?
Devon Dayah
am 3 Apr. 2019
Bearbeitet: Devon Dayah
am 3 Apr. 2019
Cris LaPierre
am 3 Apr. 2019
No. I was wondering if that might be the problem since that might have been a reason why sendmail wasn't working.
Devon Dayah
am 4 Apr. 2019
Bearbeitet: Devon Dayah
am 4 Apr. 2019
Cris LaPierre
am 4 Apr. 2019
Share your code. Otherwise we can't move beyond this point. Be sure to remove any of your account details first.
Devon Dayah
am 4 Apr. 2019
Bearbeitet: Devon Dayah
am 4 Apr. 2019
Cris LaPierre
am 4 Apr. 2019
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
am 5 Apr. 2019
Bearbeitet: Devon Dayah
am 5 Apr. 2019
Devon Dayah
am 8 Mai 2019
Kategorien
Mehr zu Web Services finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!