1

How can I send an email without requiring a mail server and username:password to a specific for e.g.[email protected] email address? So basically I just have the message and a to-email address.

Is this the correct way to do it?

  • find the mail server using dns mx record of the myserver.com
  • Conncet and send an email using smtp to this address?

if yes, how do I do this in java?

some background info - I have webserver and I want to implement a feedback form to the web app user, the webserver gets this form in a POST request and sends this data to a specific email address

note: there are lots of examples using gmail, but then that needs a username password, I would like to avoid that

answer:https://stackoverflow.com/a/271829/494461

1

1 Answer 1

1

A smtp server is required in order to send the email. If you find the email server for @myserver.com doing a DNS MX lookup, you'll end connecting to that smtp server. So a server is required.

This link would help you: java dns wx lookup example

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.