title: I cannot send a mail in mule
body: <p>I get that error message when I try to execute my muleproject </p>
  
  <blockquote>
    <p>"The endpoint is malformed  an cannot be parsed" and this is the endpoint </p>
  </blockquote>
  
  <p>Here's the code:</p>
  
  <pre><code>&lt;smtp:outbound-endpoint host="smtp.gmail.com" user="mymail@gmail.com" password="mypass" 
  to="destiny@gmail.com" from="my@gmail.com" responseTimeout="10000" 
  doc:name="SMTP" port="587" subject="the subject"/&gt;
  </code></pre>
  
  <p>where is the mistake??</p>
  
  <p>I have removed the "@gmail.com" from user and the project now is deployed but  it rises this exception</p>
  
  <pre><code>Root Exception stack trace:
  com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a      STARTTLS command first. cf12sm8298386wjb.10 - gsmtp
  
  at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1829)
  at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1368)
  at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:886)
  + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
  </code></pre>
  
  <p>Here is the full stacktrace</p>
  
  <pre><code>    INFO  2015-03-26 22:26:00,479 [[domotica2].connector.smtp.mule.default.dispatcher.01] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default outbound transformer: org.mule.transport.email.transformers.ObjectToMimeMessage
  INFO  2015-03-26 22:26:00,499 [[domotica2].connector.smtp.mule.default.dispatcher.01] org.mule.lifecycle.AbstractLifecycleManager: Initialising: 'connector.smtp.mule.default.dispatcher.2081412619'. Object is: SmtpMessageDispatcher
  INFO  2015-03-26 22:26:00,912 [[domotica2].connector.smtp.mule.default.dispatcher.01] org.mule.lifecycle.AbstractLifecycleManager: Starting: 'connector.smtp.mule.default.dispatcher.2081412619'. Object is: SmtpMessageDispatcher
  ERROR 2015-03-26 22:26:01,100 [[domotica2].connector.smtp.mule.default.dispatcher.01] org.mule.exception.DefaultMessagingExceptionStrategy: 
  ********************************************************************************
  Message               : Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=smtp://mymail:&lt;password&gt;@smtp.gmail.com, connector=SmtpConnector
  {
    name=connector.smtp.mule.default
    lifecycle=start
    this=77c233af
    numberOfConcurrentTransactedReceivers=4
    createMultipleTransactedReceivers=true
    connected=true
    supportedProtocols=[smtp]
    serviceOverrides=&lt;none&gt;
  }
  ,  name='endpoint.smtp.mymail.gmail.com.587', mep=ONE_WAY, properties={fromAddress=mymail@gmail.com, toAddresses=destiny@gmail.com, subject=SD}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: MimeMessage
  Code                  : MULE_ERROR-42999
  --------------------------------------------------------------------------------
  Exception stack is:
  1. 530 5.7.0 Must issue a STARTTLS command first. md2sm586901wic.19 - gsmtp
   (com.sun.mail.smtp.SMTPSendFailedException)
    com.sun.mail.smtp.SMTPTransport:1829 (null)
  2. Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=smtp://mymail:&lt;password&gt;@smtp.gmail.com, connector=SmtpConnector
  {
    name=connector.smtp.mule.default
    lifecycle=start
    this=77c233af
    numberOfConcurrentTransactedReceivers=4
    createMultipleTransactedReceivers=true
    connected=true
    supportedProtocols=[smtp]
    serviceOverrides=&lt;none&gt;
  }
  ,  name='endpoint.smtp.mymail.gmail.com.587', mep=ONE_WAY, properties={fromAddress=mymail@gmail.com, toAddresses=destiny@gmail.com, subject=SD}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: MimeMessage (org.mule.api.transport.DispatchException)
    org.mule.transport.AbstractMessageDispatcher:117 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/DispatchException.html)
  --------------------------------------------------------------------------------
  Root Exception stack trace:
  com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. md2sm586901wic.19 - gsmtp
  
      at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1829)
      at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1368)
      at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:886)
      + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
  ********************************************************************************
  </code></pre>