Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E4EA5D780 for ; Sun, 19 May 2013 07:55:07 +0000 (UTC) Received: (qmail 65053 invoked by uid 500); 19 May 2013 07:55:07 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 65014 invoked by uid 500); 19 May 2013 07:55:07 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 64995 invoked by uid 99); 19 May 2013 07:55:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 May 2013 07:55:06 +0000 X-ASF-Spam-Status: No, hits=1.6 required=5.0 tests=FREEMAIL_REPLY,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.223.179 as permitted sender) Received: from [209.85.223.179] (HELO mail-ie0-f179.google.com) (209.85.223.179) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 May 2013 07:55:03 +0000 Received: by mail-ie0-f179.google.com with SMTP id c13so12124179ieb.10 for ; Sun, 19 May 2013 00:54:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=nqHn92d33f8xMY90yXqepHHmfMzi8AaHprlh5VQWDBE=; b=Qdj0Cvm7weWfV7ZnUojPGkyFKth3B6rpX5PjlJ0j+cSxvSUvPlfvx74E+0KuV+XH2n kEG1t4x4jPRD1Sx3Dm8zEQV3p4fCwQbg1twYweNcSSnhgQZelVo8LTutS+yuBVEIa02n 0cQGLre/lQ3Z9zqlqB5UICPKhBViVOc+WGadVYc+unZnlKr7y7+ZcbjdPoxvteyQF3Aj 5rB+Igd9GjTbHPMyL8OoWN5xSWUoK9GOZbWLyhJ01HvhPI9oKwoH4LW2D9Ymw5pUaEuF +f+grcY8myY9nzg8S0xM9m99lv78UjwDxNeeB7GRM5dVT0F8E8qq+exMGRptwVR7z9o/ 0iBw== X-Received: by 10.50.11.229 with SMTP id t5mr2539070igb.65.1368950082717; Sun, 19 May 2013 00:54:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.20.200 with HTTP; Sun, 19 May 2013 00:54:22 -0700 (PDT) In-Reply-To: <1368896684151-5732800.post@n5.nabble.com> References: <1357651729846-5725119.post@n5.nabble.com> <1357652883784-5725124.post@n5.nabble.com> <1357829636439-5725286.post@n5.nabble.com> <1368896684151-5732800.post@n5.nabble.com> From: Claus Ibsen Date: Sun, 19 May 2013 09:54:22 +0200 Message-ID: Subject: Re: camel-mail To: "users@camel.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi If you see any exception then that may have details that can lead you to what is wrong etc. And make sure your username and password is correct. Also you need to set a header with the "to" eg with the email to who is to receive the email. setHeader("to", constant("someone@somewhere.com")) On Sat, May 18, 2013 at 7:04 PM, nickerox wrote: > Hi Claus, > > I`m testing this simple java code: > > CamelContext ctx = new DefaultCamelContext(); > > ctx.addRoutes(new RouteBuilder() { > > @Override > public void configure() throws Exception { > > from("direct:mail"). > setHeader("subject", constant("Apache camel test")) > .setHeader("From", constant("test@virgilio.it")) > .to("smtp://username@virgilio.it?password=****"); > } > }); > > ctx.start(); > > Endpoint endpoint = ctx.getEndpoint("direct:mail"); > > ProducerTemplate p = new DefaultProducerTemplate(ctx, endpoint); > p.start(); > p.sendBody("Hello!"); > System.out.println("Sent!"); > p.stop(); > ctx.stop(); > > > receiving this response: Could not connect to SMTP host: virgilio.it, port: > 25 (right, because SMTP server is out.virgilio.it); > If i substitute the endpoint with > "smtp://username@out.virgilio.it?password=****" > I get the right AddressFailedException. > So, please, could you help me to understand my error or if i have missed any > properties? > Thx in advance > > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/camel-mail-tp5725119p5732800.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- www.camelone.org: The open source integration conference. Red Hat, Inc. FuseSource is now part of Red Hat Email: cibsen@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen