props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.port", portnumber);
props.put("mail.smtp.host", "smtp.office365.com");
props.put("mail.smtp.auth", "true");
I am using this code for sending email in java using my linux machine. Please tell me which OS service it is using internally currently for sending mail.and I want to change this service to ssmtp . How will I send through ssmtp.
The code you show seems to use the Java Mail API, which is included in your java project and used here as an SMTP client to send the mail. The SMTP server used here is : smtp.office365.com
However, ssmtp is not a service as you mentioned. It is another email client.
I invite you to have a deeper look into these tools to have a clearer idea before using them.