title: javamail.setFrom() is not working in my spring project
body: <p>By using Java mail, the user attempts to implement the functions of receiving inquiries by mail. However, if you use setFrom(), it is overwritten with the authenticated mail address rather than the email that you set.</p>
  
  <p>When a user enters their own mail, Put the user's mail in setFrom(). but it is overwritten every moment.</p>
  
  <p>I tried the parameter values as a string, but it didn't work.
  The code that sends mail uses ajax.</p>
  
  <h1>context-mail.xml</h1>
  
  <pre><code>&lt;bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"&gt;
      &lt;property name="host" value="smtp.gmail.com" /&gt;
      &lt;property name="port" value="587" /&gt;
      &lt;property name="username" value="email" /&gt;
      &lt;property name="password" value="password" /&gt;
      &lt;property name="javaMailProperties"&gt;
          &lt;props&gt;
              &lt;prop key="mail.smtp.auth"&gt;true&lt;/prop&gt;
              &lt;prop key="mail.smtp.starttls.enable"&gt;true&lt;/prop&gt;
          &lt;/props&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <h1>Controller</h1>
  
  <pre><code>@RequestMapping(value = "/mail")
  public void mailSend(HttpServletRequest request, HttpServletResponse response,
          ModelMap model, @RequestParam Map param) throws Exception {
      SessionVO session = getSessionVO(request, response);
  
      final Map&lt;String, String&gt; qna = (Map&lt;String, String&gt;)((List)qnaService.selectQna(param).get("qnaResultList")).get(0);
      final List&lt;Map&gt; qnaFile= qnaService.selectQnaFile(param);
      final Map[] file = new HashMap[qnaFile.size()];
  
      for(int i=0;i&lt;qnaFile.size();i++){                  
          FileVO vo=new FileVO();
          vo.setFileId((String)qnaFile.get(i).get("fileId"));
          file[i]=fileService.getimgfile(vo, response);
      }
  
      logger.info(qna+"");
      logger.info(qnaFile+"");
  
  
      final MimeMessagePreparator preparator = new MimeMessagePreparator() { 
          @Override 
          public void prepare(MimeMessage mimeMessage) throws Exception { 
              final MimeMessageHelper helper = new MimeMessageHelper(mimeMessage, true, "UTF-8");
              helper.setSentDate(new Date());
              helper.setFrom(qna.get("email"), qna.get("userName")); //
              helper.setTo(new InternetAddress("auth email"));
              helper.setSubject(qna.get("userName")+"-"+qna.get("qnaType"));
              helper.setText(qna.get("content"), true);
  
              for (Map m : file) {
                  helper.addAttachment((String)m.get("fileNm"), (File)m.get("file"));                 
              }
          }
      };
  
      mailSender.send(preparator);
  }
  </code></pre>
  
  <p>There is no error, but the sender's mail address is wrong.</p>