Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5318 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello!

I'm absolutely new to programming Java or Groovy. That's why I ask for your support.

I'd like to set a different port in an authenticated mail than the one that is set by default. Can anybode give me some directions how to program that in Groovy for the ScriptMaster Plugin? I have tryed to add a new parameter portNumber and then to replace the "-1" with that paramter but constantly get errors.

// Send with authentication

Transport transport = Session.getDefaultInstance(props).getTransport("smtp");

int port = -1; // use the default port

transport.connect(smtpHost, port, username, password);

transport.sendMessage(message, message.getAllRecipients());

transport.close();

return true

Thanks for your help!

Martin

P.S. if anybody has a clue how to program the ssl encryption, I'd appreciate your input ;-)

Posted

Cool, I found a solution by accident myself:

int port = Integer.valueOf(portNumber);

But the P.S. Question is still open.... ;-)

Martin

This topic is 5318 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.