I have created a file transfer service that sends files from one directory to another using a file connector. This is done over FTP server. I have an email that sends out after a file has successfully transferred, however it does not work over my FTP server but it does work when I tested it locally. There are no error received, the email is just not sending.
Is there a specific way to do this using 'Mail to' with an FTP server ?
This is my email code:
<log level="custom">
<property name="sequence" value="FileReadSeq"/>
</log>
<property name="messageType" scope="axis2" type="STRING" value="text/html"/>
<property name="ContentType" scope="axis2" type="STRING" value="text/html"/>
<property name="Subject" scope="transport" type="STRING" value="File Received"/>
<property name="OUT_ONLY" scope="default" type="STRING" value="true"/>
<send>
<endpoint name="FileEpr">
<address uri="mailto:myemail@gmail.com">
<suspendOnFailure>
<initialDuration>-1</initialDuration>
<progressionFactor>1</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</address>
</endpoint>
</send>
All the configurations in the axis.xml and deployment files are there for email.
I am confused as how it works locally but not over FTP.
Deployment.toml coonfiguration code below:
[[transport.mail.sender]]
name = "mailto"
parameter.hostname = "smtp.gmail.com"
parameter.port = "587"
parameter.enable_tls = true
parameter.auth = true
parameter.username = "myemail@gmail.com"
parameter.password = "emailpassword"
parameter.from = "myemail@gmail.com"
this is the configuration in my axis.xml file:
<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">myemail@gmail.com</parameter>
<parameter name="mail.smtp.password">emailpassword</parameter>
<parameter name="mail.smtp.from">myemail@gmail.com</parameter>
</transportSender>