Question

configured Office365 email SMPT doesn't work to sen email

Posted December 26, 2019 714 views
Email

Hi All!

I am new user on digitalocean. I transfered my doman from Godday to digitalocean and configured a droplet in which I installed a website template. everything went smoothly and workes fine. however, my website doesn’t send emails to the user, like authentication etc....

I am using Ubuntu latest version and my smpt configuration is correct in .env file.
while registration to my website it sends verification emails show (Flash message) but it doesn’t come to the user. I talked to my template provider and got to know that my server configuration is not correct. I am new user of Linux and also new on Digitalocean.

Any kind of guide or help appreciates very much

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
3 answers

Hi @Unknowreader,

If you wish to use your server to send emails from it as well as host your website, you’ll need to install a mailing service. I’ll recommend using Postfix as it’s quite common and there are a lot of tutorials. There is even one here at DigitalOcean - https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-on-ubuntu-18-04

I’ll recommend going through the guide, installing and configuring your Postfix service and then trying to send a message from your droplet/server with DigitalOcean.

Regards,
KDSys

by Justin Ellingwood
by Hanif Jetha
Postfix is a popular open-source Mail Transfer Agent (MTA) that can be used to route and deliver email on a Linux system. It is estimated that around 25% of public mail servers on the internet run Postfix. In this guide, we'll teach you how to get up and running quickly using the Postfix mail server.
  • Oh ok. I didnt know that really that I need also install mailing service in order to able to send emails to user. I always used before managed hosting and it become expensive so I turned to digitalocean. I will try to install it. thank you for the nice guidance and usefull information you provided me.

Hello, @Unknowreader

May I ask if you’ve configured any mailing service on your droplet as well? Another thing to do is to contact our support team via support ticket and make sure that SMTP is enabled for your account as well.

Regards,
Alex

  • No as far as I know it didn’t configured mailing service on my droplet. I actually had hired a linux expert who setted up a droplet and configured it all. However, he didnt configured any mailing service.

    this is my SMPT configuration in my .env file. the attribute in the following configuration is anonymous.

    MAILDRIVER=sendmail
    MAIL
    HOST=smtp.office365.com
    MAILPORT=587
    MAIL
    USERNAME=example@demo.com
    MAILPASSWORD=123456789
    MAIL
    ENCRYPTION=SSL
    MAILFROMADDRESS=no-reply@demo.com
    MAILFROMNAME=No-Reply
    MAILREPLYTOADDRESS=example@demo.com
    MAIL
    REPLYTONAME=Reply

    • The application will use an external host (mail provider) in this case Office 365 so this is not really needed. What you can do is check if port 587 is actually open on your droplet.

      You can try to connect to smtp.office365.com from your droplet using telnet via the command line:

      telnet smtp.office365.com 587
      

      Let me know how this goes.

      Regards,
      Alex

I am using Putty on windows. after entering the command I got the following.

Connected to FRA-efz.ms-acdc.office.com.
Escape character is ’^]’.
220 AM0PR06CA0031.outlook.office365.com Microsoft ESMTP MAIL Service ready at Fr i, 27 Dec 2019 16:20:56 +0000

Submit an Answer