You can use the secure vault support. https://docs.wso2.com/display/EI640/Working+with+Passwords+in+the+ESB+profile
On Fri, Oct 26, 2018 at 5:49 PM, Aman Singh <[email protected]> wrote: > Hi Thishani, > > Thank you , I forgot to enable secure apps in Google account. > > One general question, I am storing my mail id and password in my > axis2.xml, can't I do this more securely by storing those somewhere else > and just referring those in axis2.xml? > > Thanks, > Aman. > > On Fri, 26 Oct 2018, 16:16 Thishani Lucas <[email protected] wrote: > >> Are you getting an authentication-failed exception? If so, you need to >> allow access to less secure apps in your mail account configs. >> >> https://support.google.com/accounts/answer/6010255?hl=en >> >> On Fri, Oct 26, 2018 at 3:50 PM, Aman Singh <[email protected]> >> wrote: >> >>> >>> Hi, >>> >>> I have made a sample proxy service which sends mail to any mail ID using >>> SMTP, below is my proxy config code:- >>> >>> <?xml version="1.0" encoding="UTF-8"?> >>> <proxy name="SMTPEmailSender" startOnLoad="true" transports="http https" >>> xmlns="http://ws.apache.org/ns/synapse"> >>> <target> >>> <inSequence> >>> <property name="Subject" scope="transport" type="STRING" >>> value="Sample Email using WSO2 ESB"/> >>> <property name="OUT_ONLY" scope="default" type="STRING" >>> value="true"/> >>> <property name="FORCE_SC_ACCEPTED" scope="axis2" >>> type="STRING" value="true"/> >>> <payloadFactory media-type="xml"> >>> <format key="gov:/TestFolder/SampleTemplate.xml"/> >>> <args/> >>> </payloadFactory> >>> <property name="messageType" scope="axis2" type="STRING" >>> value="text/html"/> >>> <send> >>> <endpoint> >>> <address uri="mailto:[email protected]"></address> >>> </endpoint> >>> </send> >>> </inSequence> >>> <outSequence/> >>> <faultSequence/> >>> </target> >>> </proxy> >>> >>> >>> I have also enabled SMTP in axis2 as below: >>> >>> <transportSender name="mailto" <transportSender name="mailto" >>> class="org.apache.axis2.transport.mail.MailTransportSender"> >>> <parameter name="mail.smtp.host">smtp.gmail.com</parameter> >>> <parameter name="mail.smtp.port">587</parameter> >>> <parameter name="mail.smtp.starttls.enable">true</parameter> >>> <parameter name="mail.smtp.auth">true</parameter> >>> <parameter name="mail.smtp.user">[email protected]</parameter> >>> <parameter name="mail.smtp.password">mailpassword</parameter> >>> <parameter name="mail.smtp.from">[email protected]</parameter> >>> </transportSender> >>> <transportReceiver name="mailto" class="org.apache.axis2.transport.mail. >>> MailTransportListener"/> >>> >>> >>> But I am getting the error while running proxy:- >>> >>> EndpointContext Endpoint : AnonymousEndpoint with address mailto: >>> [email protected] will be marked SUSPENDED as it failed >>> <TryitProxyError xmlns:h="http://wso2.org/ns/TryitProxy" h:status="SOAP >>> envelope error">org.apache.axis2.AxisFault: The input stream for an >>> incoming message is null.</TryitProxyError> >>> >>> Can someone help in this issue? >>> Thanks, >>> Aman >>> >>> _______________________________________________ >>> Dev mailing list >>> [email protected] >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> *Thishani Lucas* >> *Software Engineer* >> *WSO2 Lanka (Private) Limited**: http://wso2.com <http://wso2.com/>* >> *lean.enterprise.middle-ware* >> >> *Tel: +94 77 2556931 * >> >> *LinkedIn: https://www.linkedin.com/in/thishani-lucas/ >> <https://www.linkedin.com/in/thishani-lucas/>* >> >> >> <http://wso2.com/signature> >> > -- *Thishani Lucas* *Software Engineer* *WSO2 Lanka (Private) Limited**: http://wso2.com <http://wso2.com/>* *lean.enterprise.middle-ware* *Tel: +94 77 2556931 * *LinkedIn: https://www.linkedin.com/in/thishani-lucas/ <https://www.linkedin.com/in/thishani-lucas/>* <http://wso2.com/signature>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
