I have a Kubernetes cluster running a Apache web service. The service exposes ports 80 and 443. There is a smtp mail server within the organization which is configured to the php.ini with the smtp host and port number. So, while the web application is accessed via browser the php scripts uses sendmail to mail any user within the organization. I can also do the same by connecting to the pod that runs the web service.
I created a Cronjob to run some scheduled tasks within the same cluster. At the end of the job (php scripts) an email is fired by the script within the Cronjob pod. However, the sendmail says success, but no email received. i tried linking the webservice without any luck. I tried to add the smtp host and port number to the configuration files in Cronjob pod, but no luck in sending a successful email. I do understand that the pod sends the email, but not received by the service to forward to the ingress controller.
Any help or examples would be much appreciated.
Thanks
NT