This week's book giveaway is in the NodeJS forum.
We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line!
See this thread for details.
Win a copy of Serverless Applications with Node.js this week in the NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

Issue with email sending  RSS feed

 
Ranch Hand
Posts: 451
6
Netbeans IDE Oracle Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a issue with gmail:





Sometimes it works, sometomes it is not working.

My exception is:

Sending the email to the following server failed : smtp.gmail.com:465

I send a email to Google and I am waiting a response.

Thanks,



 
Rancher
Posts: 3986
47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you paste the full exception ans stack trace you get?
 
Dana Ucaed
Ranch Hand
Posts: 451
6
Netbeans IDE Oracle Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
=======send email start
null
=======end email
com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. i10-v6sm8616244wmf.4 - gsmtp

at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2343)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1808)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1285)
at javax.mail.Transport.send0(Transport.java:255)
at javax.mail.Transport.send(Transport.java:124)
at frameworkcontentspeed.Utils.SendEmailAtachament.SendEmailAnda(SendEmailAtachament.java:353)
at frameworkcontentspeed.Utils.SendEmailAtachament.main(SendEmailAtachament.java:479)
 
Ranch Hand
Posts: 138
5
MS IE Notepad Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you use SMTP on TCP/587 - this is PLAIN with STARTTLS
what you're doin: setting socketfactory to SSL - WRONG!

When you want to use socket level SSL - this is SMTPS (oh - and it's very wrong to use SMTP and set socketfactory to ssl - that's what's SMTPS for) - and runs on TCP/465. So remove that socketfactory crap and add mail.smtp.starttls true - that's the right way.

Also - if you have 2FA enabled - you need to use application passwords.
 
permaculture is a more symbiotic relationship with nature so I can be even lazier. Read tiny ad:
global solutions you can do at home or in your backyard
https://www.kickstarter.com/projects/paulwheaton/better-world-boo
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!