Hi Aneela,

I briefly went thorough the code before answering. This[1] is the line
where we populate the properties and then later we use that properties to
create a new session. I did not debug but it looks like we are setting
everything coming from the configuration. Can you please remote debug with
this source and check whether new custom properties are coming here or not?

[1]
https://github.com/wso2/carbon-analytics-common/blob/master/components/event-publisher/event-output-adapters/org.wso2.carbon.event.output.adapter.email/src/main/java/org/wso2/carbon/event/output/adapter/email/EmailEventAdapter.java#L164

/Tishan

On Mon, Oct 17, 2016 at 1:19 PM, Aneela Safdar <ansaf_...@yahoo.com> wrote:

> Hi Tishan,
>
> Thank you for your response once again.
>
> I have added the given keys from that document. Unfortunately I couldn't
> locate user and password keys for proxy authentication,
> After adding fields of proxy server and port, I am still getting same
> error. I am also concerned with the back end class of this email adapter,
> as it doesnot taking proxy related keys and making any use of them. Is this
> the problem? Any suggestions?
>
>     <adapterConfig type="email">
>         <!-- Comment mail.smtp.user and mail.smtp.password properties to
> support connecting SMTP servers which use trust
>         based authentication rather username/password authentication -->
>         <property key="mail.smtp.from">safdar.anee...@gmail.com</property>
>         <property key="mail.smtp.user">Aneela Safdar</property>
>         <property key="mail.smtp.password">********</property>
>         <property key="mail.smtp.host">smtp.gmail.com</property>
>         <property key="mail.smtp.port">587</property>
>         <property key="mail.smtp.starttls.enable">true</property>
>         <property key="mail.smtp.auth">true</property>
>
> *  <property key="mail.smtp.socks.host">172.30.10.148</property>
> <property key="mail.smtp.socks.port">3128</property>*
>         <!-- Thread Pool Related Properties -->
>         <property key="minThread">8</property>
>         <property key="maxThread">100</property>
>         <property key="keepAliveTimeInMillis">20000</property>
>         <property key="jobQueueSize">10000</property>
>     </adapterConfig>
>
>
>
> [2016-10-17 12:46:02,732] ERROR {org.wso2.carbon.event.output.
> adapter.email.Emai
> lEventAdapter} -  Event dropped at Output Adapter 'AlertEmailPublisher'
> for tena
> nt id '-1234', Error in message format, Unknown SMTP host:
> smtp.googlemail.com
> javax.mail.MessagingException: Unknown SMTP host: smtp.gmail.com;
>   nested exception is:
>         java.net.UnknownHostException: smtp.googlemail.com
>         at com.sun.mail.smtp.SMTPTransport.openServer(
> SMTPTransport.java:1280)
>         at com.sun.mail.smtp.SMTPTransport.protocolConnect(
> SMTPTransport.java:37
> 0)
>         at javax.mail.Service.connect(Service.java:297)
>         at javax.mail.Service.connect(Service.java:156)
>         at javax.mail.Service.connect(Service.java:105)
>         at javax.mail.Transport.send0(Transport.java:168)
>         at javax.mail.Transport.send(Transport.java:98)
>         at org.wso2.carbon.event.output.adapter.email.
> EmailEventAdapter$EmailSen
> der.run(EmailEventAdapter.java:306)
>         at java.util.concurrent.Executors$RunnableAdapter.
> call(Executors.java:47
> 1)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>         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: java.net.UnknownHostException: smtp.gmail.com
>         at java.net.AbstractPlainSocketImpl.connect(
> AbstractPlainSocketImpl.java
> :178)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>         at java.net.Socket.connect(Socket.java:579)
>         at java.net.Socket.connect(Socket.java:528)
>         at com.sun.mail.util.SocketFetcher.createSocket(
> SocketFetcher.java:232)
>         at com.sun.mail.util.SocketFetcher.getSocket(
> SocketFetcher.java:189)
>         at com.sun.mail.smtp.SMTPTransport.openServer(
> SMTPTransport.java:1250)
>         ... 12 more
>
>
>
> Regards, Aneela Safdar
>
>
> ------------------------------
> *From:* Tishan Dahanayakage <tis...@wso2.com>
> *To:* Aneela Safdar <ansaf_...@yahoo.com>
> *Cc:* WSO2 Developers' List <dev@wso2.org>
> *Sent:* Monday, October 17, 2016 9:53 AM
> *Subject:* Re: [Dev] Email Notification under a proxy server
>
> Hi Aneela,
>
> Please use following doc to id the keys and then add those as new property
> element to the file and try.
>
> https://javamail.java.net/nonav/docs/api/com/sun/mail/
> smtp/package-summary.html
>
> Thanks
> /Tishan
>
> On Thu, Oct 13, 2016 at 9:27 PM, Aneela Safdar <ansaf_...@yahoo.com>
> wrote:
>
> Hi Tishan,
>
> Thanks for response.
>
> I was wondering there are no properties key for proxy server ip and its
> port, also for username and password for authentication from proxy. All I
> could see in output-event-adapter.xml are those which I have already used.
>
>     <adapterConfig type="email">
>         <!-- Comment mail.smtp.user and mail.smtp.password properties to
> support connecting SMTP servers which use trust
>         based authentication rather username/password authentication -->
>         <property key="mail.smtp.from">safdar. anee...@gmail.com
> <safdar.anee...@gmail.com></property>
>         <property key="mail.smtp.user">Aneela Safdar</property>
>         <property key="mail.smtp.password">***** ****</property>
>         <property key="mail.smtp.host">smtp. googlemail.com
> <http://smtp.googlemail.com/></property>
>         <property key="mail.smtp.port">465</ property>
>         <property key="mail.smtp.starttls. enable">true</property>
>
>         <property key="mail.smtp.auth">true</ property>
>         <!-- Thread Pool Related Properties -->
>         <property key="minThread">8</property>
>         <property key="maxThread">100</property>
>         <property key="keepAliveTimeInMillis"> 20000</property>
>         <property key="jobQueueSize">10000</ property>
>     </adapterConfig>
>
> Can you tell me what should be the keys for following values
>
> proxy server ip
> proxy server port
> proxy authentication username
> proxy authentication password
>
> Thanks in advance.
>
> Regards,
> Aneela Safdar
>
>
> ------------------------------
> *From:* Tishan Dahanayakage <tis...@wso2.com>
> *To:* Aneela Safdar <ansaf_...@yahoo.com>
> *Cc:* WSO2 Developers' List <dev@wso2.org>
> *Sent:* Wednesday, October 12, 2016 5:18 PM
> *Subject:* Re: [Dev] Email Notification under a proxy server
>
> Hi,
>
> Yes. you can add required AMTP properties to out-event-adaptor.xml. Also
> please make sure that your proxy server supports SOCKS and allows anonymous
> connections. This[1] is the class that represent the adaptor. This will be
> useful if you run into any issues.
>
> [1] https://github.com/wso2/ carbon-analytics-common/blob/
> master/components/event- publisher/event-output- adapters/org.wso2.carbon.
> event.output.adapter.email/ src/main/java/org/wso2/carbon/
> event/output/adapter/email/ EmailEventAdapter.java
> <https://github.com/wso2/carbon-analytics-common/blob/master/components/event-publisher/event-output-adapters/org.wso2.carbon.event.output.adapter.email/src/main/java/org/wso2/carbon/event/output/adapter/email/EmailEventAdapter.java>
>
> Thanks,
> Tishan
>
> On Wed, Oct 12, 2016 at 4:10 PM, Aneela Safdar <ansaf_...@yahoo.com>
> wrote:
>
> Hi,
>
> I am trying to use Email adapter in order to provide notifications. But
> the problem is I am behind a proxy server and JavaMail doesnot support any
> web proxy, After a little search, I have found out that it is doable if
> proxy server supports SOCKS. It means I have to add parameters of Email
> adapter  in outout-event-adapter.xml file to put information of proxy
> server ip, port, username and password etc. Any suggestions or other way
> out?
>
>
> Regards,
> Aneela Safdar
>
> ______________________________ _________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/ mailman/listinfo/dev
> <http://wso2.org/cgi-bin/mailman/listinfo/dev>
>
>
>
>
> --
> Tishan Dahanayakage
> Senior Software Engineer
> WSO2, Inc.
> Mobile:+94 716481328
>
> Disclaimer: This communication may contain privileged or other
> confidential information and is intended exclusively for the addressee/s.
> If you are not the intended recipient/s, or believe that you may have
> received this communication in error, please reply to the sender indicating
> that fact and delete the copy you received and in addition, you should not
> print, copy, re-transmit, disseminate, or otherwise use the information
> contained in this communication. Internet communications cannot be
> guaranteed to be timely, secure, error or virus-free. The sender does not
> accept liability for any errors or omissions.
>
>
>
>
>
> --
> Tishan Dahanayakage
> Senior Software Engineer
> WSO2, Inc.
> Mobile:+94 716481328
>
> Disclaimer: This communication may contain privileged or other
> confidential information and is intended exclusively for the addressee/s.
> If you are not the intended recipient/s, or believe that you may have
> received this communication in error, please reply to the sender indicating
> that fact and delete the copy you received and in addition, you should not
> print, copy, re-transmit, disseminate, or otherwise use the information
> contained in this communication. Internet communications cannot be
> guaranteed to be timely, secure, error or virus-free. The sender does not
> accept liability for any errors or omissions.
>
>
>


-- 
Tishan Dahanayakage
Senior Software Engineer
WSO2, Inc.
Mobile:+94 716481328

Disclaimer: This communication may contain privileged or other confidential
information and is intended exclusively for the addressee/s. If you are not
the intended recipient/s, or believe that you may have received this
communication in error, please reply to the sender indicating that fact and
delete the copy you received and in addition, you should not print, copy,
re-transmit, disseminate, or otherwise use the information contained in
this communication. Internet communications cannot be guaranteed to be
timely, secure, error or virus-free. The sender does not accept liability
for any errors or omissions.
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to