Jump to content

[Solved] Can't send e-mails from servlet


vukosyst

Recommended Posts

We use a Java servlet that has an e-mail functionality which sends e-mails through an external SMTP server. Due to the fact that we cannot use the Gmail-SMTP server for sending e-mails (see https://helionet.org/index/topic/31408-unable-to-connect-to-smtp-smtpgmailcom587/), I wanted to use the SMTP-server of IXL hosting (ixlhosting.nl) that hosts our website: mail.vuko.nl. Our code works locally, but not on Tommy. I tested the code with both port 25 and port 587, both on the insecure SMTP-server mail.vuko.nl. Unfortunately, the server does not support TLS/SSL.

 

Do you have any idea why this is not working? Can you look up log files that describe the error or can I see them myself?

 

Thanks, Martijn

Edited by vukosyst
Link to comment
Share on other sites

Gmail SMTP (and Outlook.com SMTP) are a known incompatibility with our servers. Java and PHP don't work with Gmail and Outlook.com, and we have no idea why. The ports are open and we can receive the EHLO from their servers just fine, yet you can't actually send mail. There's nothing we can really do to fix this. Something on these two services doesn't comply with standards and will not work with the standardized SMTP implementations we use.

 

You can try turning on support for "Less secure apps" in Gmail, but even with that on, the only language that I know works is Django, when using Django's own SMTP library. Even with the security setting enabled, PHP still doesn't work, and I don't know about Java.

Link to comment
Share on other sites

Wolstech, please read my post again. I switched from gmail smtp to the (authenticated) smtp server of our 'main' hosting provider and still can't get it working... Maybe tomcat log files show more info?

Will post source code asap, by the way.

Edited by vukosyst
Link to comment
Share on other sites

Firewall was misconfigured. It was set to only allow it to work for root.

 

We ran all the tests as root, which is why our tests kept passing and left us confused why it failed for everyone else. Your scripts run as your user account, which didn't have permission to communicate on port 587.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...