Sending email with camel - apache-camel

I'm having issues sending an email out through camel with the java dsl.
I've been using the camel mail guide but I receive the following error.
Caused by: [com.sun.mail.util.MailConnectException - Couldn't connect to host, port: smtp.google.com, 25; timeout 30000]
Here is what I have in my route
from("timer://foo?period=5000") // Create a message every 5 seconds
.setHeader("subject", simple("hello from camel"))
.setBody(simple("camel"))
.log("sending?")
.to("smtps://smtp.google.com?password=mypass123&username=user#custom.com&From=user#custom.com&To=testuser#gmx.com");
The email service is actually provided by gmail. Now I did see a gmail plugin, but its pretty tough to find an example, so I thought I would use the standard method for now. But if someone knows the solution using it, I welcome it!
PS. I have camel-mail dependency and thecamel-google-mail which I'm not using.
Versions 2.20.2

It was due to less secure apps not fully being turned off.
Use this link here https://www.google.com/settings/security/lesssecureapps
Also some of the silly mistakes pointed out in the comments.
Thanks!

Related

Trying to implement in-app voice call from browser

I have cloned the click-to-call repository and followed the steps as mentioned. I am able to login with said created user but then get stuck at /rtc API.I got some error in network panel. and "General SSL engine problem in console which is not correct. SSL certificates are all correct." Let me know where i went wrong. Please check the screenshot below :
I have had a talk with nexmo team, they said it is the ssl issue.
https://help.nexmo.com/hc/en-us/articles/207051767-Certificate-for-nexmo-com
Now I am unable to find where to import the certificate to my app?
I am the JavaScript Developer Advocate at Vonage (Nexmo).
You also filed an issue at https://github.com/nexmo-community/client-sdk-click-to-call correct? Thanks for that. I will also post my response here.
From your issue, it looks as if the Conversation Id is not being sent.
We recently merged some changes to the repo.
In your .env file, do you have SUPPORT_PHONE_NUMBER? That should be NEXMO_NUMBER.
Also, when calling the server, previously the code in the client.js around line 34 was application.callServer(); it is now application.callServer(application.me.name);
Let me know if this works for you.
Check with Nexmo - either you are out of balance or your account has been been marked inactive for some reason. Most of the time its because of insufficient balance.

Java IOException during API request to Stripe (APIConnectionException)

The specific action we are trying to performe is to create a charge request with Stripe:
Charge charge = Charge.create(params);
Using Stripe's Java implementation (version 5.35.1) we encounter a APIConnectionException when running the application on the deployed App Engine server. Interestingly, the issue does not occur using App Engine's local dev server.
We contacted Stripe and they said everything is fine on their side. They explained that "this error indicates that your server is not able to contact our API and that it ends up timing out waiting for an answer. Usually, this is due to something misconfigured on your server such as a DNS not redirecting to Stripe properly."
We were wondering if there are some configuration settings on App Engine which cause the problem. However, since there is no specific error message we cound not figure out what might cause the connection problem.
Similar problems which did not provide enough help to resolve this issue: https://issuetracker.google.com/35901039
Thanks for your help!
The problem seems to have solved itself. It occured for a couple of days and since a few hours the exact same code is working fine. Just like in https://issuetracker.google.com/issues/35901039 the problem is suddenly gone for some reason.

Apache Camel Endpoint URI validation

When I got an error inside an Endpoint URI the camel context wont start.
It seems like Camel validates in a first step every Endpoint URI before starting the context.
Can someone pleas tell me, how this works?
Am I right?
I cant figure it out.
Yes Camel validates that it has been configured correctly when it startup. This happens as part of starting the Camel routes.
Its like misconfiguring any other software which will report an error for you to fix.
There is some tooling which you can use to validate your source code to find endpoints that has been misconfigured. I wrote a blog entry about this: http://www.davsclaus.com/2016/01/cheers-fabric8-camel-maven-plugin-to.html

Why does tracker server NOT understand my request? (Bittorrent protocol)

I'm trying to implement Bittorent in C. First of all, before writing a code snippet, I tried to used a web browser to send the following message(URL) to the tracker server.
you may try this URL.
http://torrent.ubuntu.com:6969/announce?
info_hash=%9b%db%bbI%f0%85%a2%d1%5d%96%ac%fa%bf%f81%06%001O%e0
&peer_id=ABCDABCDABCDABCDABCD&port=6882&downloaded=0
&uploaded=0
&left=0
&event=started
I have downloaded the torrent file from this link which is named dapper-dvd-i386.iso and has 9bdbbb49f085a2d15d96acfabff8310600314fe0 as SHA-1 value.
However, after sending above request, I get
your client is outdated, please upgrade
(HTTP 400 bad request)
Why does tracker server NOT understand my reqeust? Any specs from Internet does not help me.
Any help would be awesome. Thank you in advance.
It is because the request string don't have compact=1 in it.
Most tracker require that nowadays. The legacy way is too ineffective.
See BEP 23: Tracker Returns Compact Peer Lists http://www.bittorrent.org/beps/bep_0023.html
Try:
http://torrent.ubuntu.com:6969/announce?
info_hash=%9b%db%bbI%f0%85%a2%d1%5d%96%ac%fa%bf%f81%06%001O%e0
&peer_id=ABCDABCDABCDABCDABCD&port=6882&downloaded=0
&uploaded=0
&left=0
&event=started
&compact=1
ie
http://torrent.ubuntu.com:6969/announce?info_hash=%9b%db%bbI%f0%85%a2%d1%5d%96%ac%fa%bf%f81%06%001O%e0&peer_id=ABCDABCDABCDABCDABCD&port=6882&downloaded=0&uploaded=0&left=0&event=started&compact=1
and the answer from the tracker is:
d8:completei4e10:incompletei0e8:intervali1800e5:peers6:******e

HTTPS warning for Sites in Salesforce

I am getting following error on a browser when i open Secure(HTTPS) Site URL for my sandbox org,
You attempted to reach **.cs9.force.com, but instead you actually reached a server identifying itself as .cs9.force.com. This may be caused by a misconfiguration on the server or by something more serious
The problem arises because i am using Sites for exposing WS and the HTTPS warning gives error on client side while interacting with WS.
How can i configure my org to resolve HTTPS warning message?
Because you are using sites you are able to use HTTP. There is no way to change the HTTPS Site settings. And there is no way to upload your own SSL-Certificate.
Dont know if your problem is resolved by now or not. But you need to configure your WS to accept wildcard SSL certificates. I am currently facing this issue and following link may be helpful to you.
I can't use this solution because of shared weblogic server across many applications. If you have found any solution to above, can you please comment here.

Resources