Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

thorbym's avatar

Help understanding email setup

Background: I've been a developer for five or six years, but I've never set up email sending on any application.

I have a site live on Digital Ocean, deployed through Forge, domain purchased through GoDaddy. It's all working great.

I now need to implement password reset, and I've no understanding. According to docs I can send through SMTP, or mailgun, or other services. But do I go through GoDaddy, DO, Forge, Mailgun?

Would anyone be able to give me a brief overview as to what I should do? Or point me towards an article that actually takes into consideration my lack of knowledge?!

0 likes
5 replies
Wakanda's avatar

for this just add your emails server settings in the .env

MAIL_DRIVER=smtp
MAIL_HOST=smtp.myserver.com
MAIL_PORT=465
MAIL_USERNAME=ENTER_YOUR_EMAIL_ADDRESS
MAIL_PASSWORD=ENTER_YOUR_EMAIL_PASSWORD
MAIL_ENCRYPTION=ssl

first create an email on your hosting server

then replace the mail settings with your own.

you can also use gmail

MAIL_DRIVER=smtp
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=465
MAIL_USERNAME=ENTER_YOUR_EMAIL_ADDRESS(GMAIL)
MAIL_PASSWORD=ENTER_YOUR_GMAIL_PASSWORD
MAIL_ENCRYPTION=ssl
thorbym's avatar

Thank you for taking the time to reply @loyd but I can already read the documentation. I don't understand emails, that's the problem! I don't know where I set (or even find) my "emails server settings". Is it GoDaddy? DO? Or is it mailgun??

Is this mailgun? What is mailgun?

I don't know what's possible, so I don't know where to start.

I've built apps used by lots of people, but I've never worked on email. I am starting from scratch.

thorbym's avatar

Just checked godaddy - it says "Update your domain’s DNS zone file here. First, get your MX record values from your email provider."

Who is my email provider? I just need some help understanding the basic concepts. Then I'll be good to run with it.

Please or to participate in this conversation.