Marianna,

I can't see any username in your URL. Without that the authentication will fail.
Also you don't need to write your own marshaler for setting properties. See the 
servicemix-mail
documentation page at http://servicemix.apache.org/servicemix-mail.

Please let us see the whiole endpoint configuration and only replace your login 
and password
with some dummy values.

Best regards,
Lars

--------------------------------------

Lars Heinemann
FuseSource 
Email: [email protected]
Web: http://www.fusesource.com
Blog: http://lhein.blogspot.com
Twitter: lhein77





Am 31.01.2011 um 23:48 schrieb Marianna Giacchetta:

> I tried this way:
> 
> 1) the URL "smtps://smtp.gmail.com:587?password=zzzzzz" but I have
> this exception:
> 
> ERROR - MailComponent                  - Error sending mail...
> javax.mail.MessagingException: Could not connect to SMTP host:
> smtp.gmail.com, port: 587;nested exception is:
> javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
> 
> 2) So i tried to change the dest port to 465 (gmail port for SSL), and
> here i got another exception:
> 
> DEBUG SMTP: connected to host "smtp.gmail.com", port: 465
> 
> EHLO mapi-pici
> 250-mx.google.com at your service, [151.16.107.238]
> 250-SIZE 35651584
> 250-8BITMIME
> 250-AUTH LOGIN PLAIN XOAUTH
> 250 ENHANCEDSTATUSCODES
> DEBUG SMTP: Found extension "SIZE", arg "35651584"
> DEBUG SMTP: Found extension "8BITMIME", arg ""
> DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XOAUTH"
> DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
> DEBUG SMTP: Attempt to authenticate
> DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM
> AUTH LOGIN
> 334 uwzuwzuwzuwzuwz
> 
> 334 xyzxyzxyzxyzxyzxyz
> ==   vzxvzxvzxvzxvzxvzx
> 334 xyzxyzxyzxyzxyzxyz
> ERROR - MailComponent                  - Error sending mail...
> javax.mail.AuthenticationFailedException: 334 xyzxyzxyzxyzxyzxyz
> 
> 
> 3) Then i tried this way: i wrote my own marshaler for the mail
> consumer endpoint, setting in the MimeMessage the property Geert
> suggested me. it doesn't work!
> 
> public void convertJBIToMail(MimeMessage mimeMessage, MessageExchange
> exchange, NormalizedMessage nmsg,
>         String configuredSender) throws javax.mail.MessagingException {
>               
>         try {
>             Properties props = new Properties();
>             props.put("mail.smtp.starttls.enable", "true");
>               
>             Session mailSession = Session.getDefaultInstance(props);
>             mimeMessage = new MimeMessage(mailSession);
> 
>              ...
>        }
> 
> 
> here i get the same exception i got yesterday:
> 
> com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a
> STARTTLS command first. u9sm4177318wbg.12
> 
> 
> any suggestion?
> thank you,
> Marianna
> 
> 
> 
> 2011/1/31 Lars Heinemann <[email protected]>:
>> Googlemail works fine with Servicemix-mail. I tested it a while ago in both 
>> directions.
>> If you encounter more problems let us know please.
>> 
>> Best regards,
>> Lars
>> 
>> --------------------------------------
>> 
>> Lars Heinemann
>> FuseSource
>> Email: [email protected]
>> Web: http://www.fusesource.com
>> Blog: http://lhein.blogspot.com
>> Twitter: lhein77
>> 
>> 
>> 
>> 
>> 
>> Am 30.01.2011 um 21:58 schrieb Geert Schuring:
>> 
>>> Seems to me like you are not using the correct URL to connect to an 
>>> encrypted SMTP server.
>>> 
>>> Try this one: "smtps://smtp.gmail.com:587?password=zzzzzz"
>>> 
>>> If that doesn't work try setting the following property somehow on the mail 
>>> sender: mail.smtp.starttls.enable
>>> 
>>> If true, enables the use of the STARTTLS command (if supported by the 
>>> server) to switch the connection to a TLS-protected connection before 
>>> issuing any login commands. Note that an appropriate trust store must 
>>> configured so that the client will trust the server's certificate. Defaults 
>>> to false.
>>> (Got that from 
>>> http://java.sun.com/products/javamail/javadocs/com/sun/mail/smtp/package-summary.html)
>>> 
>>> If that does not work either you could try using a camel-mail endpoint.
>>> 
>>> Let me know how it worked out. Would love to know if this solved your 
>>> problem.
>>> 
>>> Geert.
>>> 
>>> -----Original Message----- From: Marianna Giacchetta
>>> Sent: Sunday, January 30, 2011 1:43 PM
>>> To: [email protected]
>>> Subject: servicemix-mail provider endpoint
>>> 
>>> hi,
>>> i can't config the mail provider endpoint to work properly.
>>> i would like to use the gmail outgoing mail server. it uses the SMTP
>>> encrypted protocol.
>>> 
>>> i tried with this config in the xbean.xml file:
>>> 
>>> <mail:sender service="services:mail-service"
>>>           endpoint="mail-endpoint"
>>>           sender="[email protected]"
>>>           receiver="[email protected]"
>>>           debugMode="true"
>>>           connection="smtp://smtp.gmail.com:587?password=zzzzzz"/>
>>> 
>>> it gives me this exception:
>>> 
>>> com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a
>>> STARTTLS command first. u9sm4177318wbg.12
>>> 
>>> 
>>> 
>>> i'm using:
>>> servicemix version: 3.3.2
>>> OS: ubuntu maverick
>>> JVM openjdk 1.6
>>> 
>>> 
>>> 
>>> can someone help me? :(
>>> thanks,
>>> marianna
>>> 
>>> 
>> 
>> 

Reply via email to