← ResourcesConnector migration

Migrating the MuleSoft Email connector to Spring Boot

5 min read

The MuleSoft Email connector maps onto Spring's JavaMailSender for sending, and the JavaMail Session APIs for listing inboxes.

Operation mapping

  • email:send (SMTP) → JavaMailSender.send(MimeMessage)
  • email:list-imap / email:list-pop3 → JavaMailSender.getSession() + the JavaMail Store/Folder APIs

Before and after: send

Mule (XML)
<email:send config-ref="Email_Config">
  <email:to-addresses><email:to-address value="[email protected]"/></email:to-addresses>
</email:send>
Spring Boot (Java)
SimpleMailMessage msg = new SimpleMailMessage();
msg.setTo("[email protected]");
msg.setSubject(subject);
msg.setText(body);
mailSender.send(msg);

How the conversion is validated

Email is verified against a real mail server (GreenMail) running in a container — the converted app actually sends and reads mail and the results are compared.

Prove it on your own code

Send us one Mule application and your Postman collection. We convert it and prove the Spring Boot output matches field-by-field — on-premise, inside your environment.