title: Spring Boot - Set Alias name for email address
body: <p>I am trying to send a mail using Spring Boot. I am able to send the mail successfully but in the mailbox, I am seeing the alias name along with the from email address like <code>Customer Desk[customercare@xyz.com]</code>. I only want the from address alias name to be displayed in the mailbox like <code>CustomerDesk</code>. Below is my implementation of the same.</p>
  
  <pre><code>public class MailHandlerImpl implements MailHandler {
  
      @Autowired
      private JavaMailSender javaMailSender;
  
      public void sendEmail() {
          String emailToAddress = "abc@xyz.com"
          String emailFromAddress = "Customer Desk &lt;customercare@xyz.com&gt;"
          MimeMessage mimeMessage = javaMailSender.createMimeMessage();
  
          try {
  
              MimeMessageHelper messageHelper = new MimeMessageHelper(mimeMessage, true);
              mimeMessage.setFrom(new InternetAddress(emailFromAddress));
              messageHelper.setTo(InternetAddress.parse(emailToAddress));
              javaMailSender.send(mimeMessage);
          } catch (MessagingException e) {
              e.printStackTrace();
          } catch (IOException e) {
              e.printStackTrace();
          }
      }
  }
  </code></pre>
  
  <p>Can anyone explain how I can only display the Alias name in the mailbox?</p>