apache camel

Creating a component from archetype

Sending email (gmail) by camel routes

  1. Enable gmail app passwords.

    1. Enable 2-step-verification (following verification through SMS).

    2. Generate a password for the camel app (selecting app "Mail" and a device type or custom). It will venerate a 16 characters password for the camel app.

  2. Make sure the app is set up for camel-mail component.

  3. Set up a camel route

    1. Set the consumer side ('from' of camel route).

    2. Set a message subject, recipient and body.

    3. Set the producer side (mail following gmail smtp configuration).

      1. Use secure smtp on port 465 (smtps://smtp.gmail.com:465).

      2. Set the username as a valid gmail address (ex: username=myuser@gmail.com).

      3. Set the 16 characters generated app password (ex: password=abcd1234abcd5678).

      4. Set smtp authentication (mail.smtp.auth=true).

      5. Set STARTTLS as enabled (mail.smtp.starttls.enable=true).

Example:

Last updated

Was this helpful?