How to configure Sendmail inside a docker container?

0 votes

I have a Docker container running PHP and Apache AWS instance which has the docker instance running. I am not able to send an email from the docker terminal. Is there any way to send an email from docker instance using Sendmail which uses the docker's host's configuration?. 

I am not sure what the error is. 

Apr 10 in AWS by datageek
• 2,870 points
239 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Maybe Sendmail or any other mail service for that matter is installed in your Dockerfile The host, however, apparently does have Sendmail available. The "best" or most Docker-like solution is to spin up another container that runs an MTA and configure your application to use that.

answered Apr 10 by Archana
• 5,360 points
0 votes

          Here are some reference links which you can refer.

  1. Sending Emails From Docker Containers: http://tdongsi.github.io/blog/2017/05/25/sending-emails-from-docker-containers/
  2. Send mail from Docker container with host's Postfix: https://serverfault.com/questions/631941/send-mail-from-docker-container-with-hosts-postfix
  3. How do you configure Django to send mail through Postfix?: https://www.edureka.co/community/39152/how-do-you-configure-django-to-send-mail-through-postfix
  4. Docker Official Images: https://hub.docker.com/_/postfixadmin
answered Apr 10 by nmentityvibes
• 340 points
Thank you for the references!

Related Questions In AWS

0 votes
1 answer
0 votes
3 answers
+2 votes
2 answers

How do we move a domain from Hostgator to AWS Route 53?

I found this  Before transferring a domain, make ...READ MORE

answered Aug 3, 2018 in AWS by Priyaj
• 56,120 points
541 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to read a csv file stored in Amazon S3 using csv.DictReader

The code would be something like this: import ...READ MORE

answered Oct 25, 2018 in AWS by Archana
• 5,360 points
3,577 views
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.