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
