Hi, I'm trying to send an email with an attachment using Gmail connector. I'm getting the error below. didn;t receive an email. Any idea what's the issue?
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="sendEmail" startOnLoad="true" statistics="disable" trace="disable" transports="https,http"> <target> <inSequence> <property expression="get-property('transport', 'filename')" name="filename"/> <gmail.init> <userId>[email protected]</userId> <refreshToken>xxxxxxxxxxxxxxxxxxxxxxxx</refreshToken> <clientSecret>xxxxxxxxxxxxxxxxxxxxxxxx</clientSecret> <clientId>xxxxxxxxxxxxxxxxxxxxxxxxxx</clientId> <accessToken>xxxxxxxxxxxxxxxxxxxxxxxxxx</accessToken> <apiUrl>https://www.googleapis.com/gmail</apiUrl> </gmail.init> <gmail.sendMailWithAttachment> <subject>with attachement</subject> <toRecipients>[email protected]</toRecipients> <ccRecipients>[email protected]</ccRecipients> <bccRecipients>[email protected]</bccRecipients> <messageBody>attachement body</messageBody> <fileName>{$ctx:filename}</fileName> <filePath>/home/amalka/Desktop/amalka_test_in</filePath> </gmail.sendMailWithAttachment> </inSequence> <outSequence/> <faultSequence/> </target> <description/> </proxy> [2017-08-19 16:26:58,395] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "POST /gmail/v1/users/[email protected]/messages/send HTTP/1.1[\r][\n]" [2017-08-19 16:26:58,395] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "X-Frame-Options: SAMEORIGIN[\r][\n]" [2017-08-19 16:26:58,395] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Authorization: Bearer xxxxxxxxxxxxxxxxxxxx[\r][\n]" [2017-08-19 16:26:58,395] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Alt-Svc: quic=":443"; ma=2592000; v="39,38,37,35"[\r][\n]" [2017-08-19 16:26:58,395] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Vary: Origin[\r][\n]" [2017-08-19 16:26:58,396] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Vary: X-Origin[\r][\n]" [2017-08-19 16:26:58,396] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "X-XSS-Protection: 1; mode=block[\r][\n]" [2017-08-19 16:26:58,396] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Expires: Mon, 01 Jan 1990 00:00:00 GMT[\r][\n]" [2017-08-19 16:26:58,396] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Content-Encoding: gzip[\r][\n]" [2017-08-19 16:26:58,396] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Content-Type: application/json[\r][\n]" [2017-08-19 16:26:58,396] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "X-Content-Type-Options: nosniff[\r][\n]" [2017-08-19 16:26:58,396] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Pragma: no-cache[\r][\n]" [2017-08-19 16:26:58,396] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Cache-Control: no-cache, no-store, max-age=0, must-revalidate[\r][\n]" [2017-08-19 16:26:58,396] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]" [2017-08-19 16:26:58,396] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Host: www.googleapis.com[\r][\n]" [2017-08-19 16:26:58,396] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "Connection: Keep-Alive[\r][\n]" [2017-08-19 16:26:58,396] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]" [2017-08-19 16:26:58,396] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "[\r][\n]" [2017-08-19 16:26:58,397] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "e0[\r][\n]" [2017-08-19 16:26:58,397] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "[0x1f][0x8b][0x8][0x0][0x0][0x0][0x0][0x0][0x0][0x0]M[0xce]QN[0x83]0[0x0][0x0][0xd0][0xbb]p[0x82]R[0x6]q&~HM[0xeb]pVK[0xa4][0xa5][0xfd]k[0xa9]i][\n]" [2017-08-19 16:26:58,397] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "4[0xc2][0xb6][0x80][0xf1][0xee][0xe2][0xdf].[0xf0][0xf2]~[0x92]o}M[0xee][0x13]K[0xee][\n]" [2017-08-19 16:26:58,397] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << ")Ro[0xc8][0xec][0xd9][0xb3]][0xcd]z8K[0xb8][0x9f][0xd1]@S[0xd9][0xc7] 3V[0xb0][0x81][0xaf]Z[0xe4][0xa1][0xcb]^[0x1d][0x83]xQ[0xa8][0xec]Mvp[0x15][0xa1][0xe0][0xf3]).[0xaa][0xc5][0xa9]j)[0xa8]7G[0x8b][0xeb][0x8b][0x1a][0xaa][0x8b][0xf9][0x88][0xde][0x8]<i[0x88]W+*[0xdf][0xc1]pV[0xd0][0x7]F[0xec],E[0x98][0x8e]=[0xbd][0x18][0x16]O[0x6][0xe6]@[0x89][0x1c][0x1c]y[0x9d]w[0xa4]),[0xe1];[0x8b][0xf6][0xa3]%[0xe9][0xf4][0xb6][0x94]'M[0xf0][0xd2]A[0xe][0xde]9o[0xea]/[0xb0]C.2C[0xf8][0xe6]5N[0xf5][0x9b][0x89]J[0xa0]I[0xe3]d[[0x3])[0xe8][0xa8][0x4]s[0xf2][0xe6]+[0xff][0xbf][0x8f][0xe3]C[0xf2][0xfb][0x7]$[0xf2][0x9e]q[0xf2][0x0][0x0][0x0][\r][\n]" [2017-08-19 16:26:58,397] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "0[\r][\n]" [2017-08-19 16:26:58,397] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << "[\r][\n]" [2017-08-19 16:26:58,926] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "HTTP/1.1 200 OK[\r][\n]" [2017-08-19 16:26:58,926] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Cache-Control: no-cache, no-store, max-age=0, must-revalidate[\r][\n]" [2017-08-19 16:26:58,927] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Pragma: no-cache[\r][\n]" [2017-08-19 16:26:58,927] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Expires: Mon, 01 Jan 1990 00:00:00 GMT[\r][\n]" [2017-08-19 16:26:58,927] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Date: Sat, 19 Aug 2017 10:56:58 GMT[\r][\n]" [2017-08-19 16:26:58,928] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Vary: X-Origin[\r][\n]" [2017-08-19 16:26:58,928] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Content-Type: application/json; charset=UTF-8[\r][\n]" [2017-08-19 16:26:58,928] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "X-Content-Type-Options: nosniff[\r][\n]" [2017-08-19 16:26:58,928] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "X-Frame-Options: SAMEORIGIN[\r][\n]" [2017-08-19 16:26:58,929] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "X-XSS-Protection: 1; mode=block[\r][\n]" [2017-08-19 16:26:58,929] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Server: GSE[\r][\n]" [2017-08-19 16:26:58,929] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Alt-Svc: quic=":443"; ma=2592000; v="39,38,37,35"[\r][\n]" [2017-08-19 16:26:58,929] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Accept-Ranges: none[\r][\n]" [2017-08-19 16:26:58,929] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Vary: Origin,Accept-Encoding[\r][\n]" [2017-08-19 16:26:58,930] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "Transfer-Encoding: chunked[\r][\n]" [2017-08-19 16:26:58,930] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "[\r][\n]" [2017-08-19 16:26:58,930] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "5b[\r][\n]" [2017-08-19 16:26:58,930] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "{[\n]" [2017-08-19 16:26:58,931] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> " "id": "15dfa23872df474a",[\n]" [2017-08-19 16:26:58,931] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> " "threadId": "15dfa23872df474a",[\n]" [2017-08-19 16:26:58,931] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> " "labelIds": [[\n]" [2017-08-19 16:26:58,931] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> " "SENT"[\n]" [2017-08-19 16:26:58,931] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> " ][\n]" [2017-08-19 16:26:58,931] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "}[\n]" [2017-08-19 16:26:58,931] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "[\r][\n]" [2017-08-19 16:26:58,931] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "0[\r][\n]" [2017-08-19 16:26:58,931] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> "[\r][\n]" [2017-08-19 16:26:58,935] ERROR - GmailMailSender No recipients are found [2017-08-19 16:26:58,935] INFO - GmailUtils Stored the error response [2017-08-19 16:26:58,935] ERROR - GmailMailSender No recipients are found org.wso2.carbon.connector.core.ConnectException: No recipients are found at org.wso2.carbon.connector.GmailMailSender.connect(GmailMailSender.java:53) at org.wso2.carbon.connector.core.AbstractConnector.mediate(AbstractConnector.java:32) at org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:84) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59) at org.apache.synapse.mediators.template.TemplateMediator.mediate(TemplateMediator.java:104) at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:148) at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:84) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97) at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:281) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:766) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:282) at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:554) at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:261) at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) [2017-08-19 16:26:58,936] INFO - GmailUtils Stored the error response [2017-08-19 16:26:58,936] ERROR - GmailMailSender No recipients are found org.apache.synapse.SynapseException: No recipients are found at org.apache.synapse.mediators.AbstractMediator.handleException(AbstractMediator.java:367) at org.wso2.carbon.connector.GmailMailSender.connect(GmailMailSender.java:56) at org.wso2.carbon.connector.core.AbstractConnector.mediate(AbstractConnector.java:32) at org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:84) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59) at org.apache.synapse.mediators.template.TemplateMediator.mediate(TemplateMediator.java:104) at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:148) at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:84) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97) at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:281) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:766) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:282) at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:554) at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:261) at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: org.wso2.carbon.connector.core.ConnectException: No recipients are found at org.wso2.carbon.connector.GmailMailSender.connect(GmailMailSender.java:53) ... 19 more Thanks Amalka
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
