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

Loriko's avatar

Sending/receiving mail with forge/digital ocean

Hey all,

Im using forge + digital ocean, im trying to send and receive mail with my Laravel application. The way im trying to get this done is using the main mail server from my domain name registering company. They have SMTP settings that i used inside mail.php.

'driver' => 'smtp',
'host' => 'mail.axc.nl',
'port' => 465,
'from' => array('address' => 'info@example.com', 'name' => 'My Name'),
'encryption' => '',
'username' => 'info@example.com',
'password' => 'mypassword',

However im getting the error : Expected response code 250 but got code "", with message ""

Does anyone have a suggestion how i could fix this? Or another way to achieve sending/receiving mail through smtp.

0 likes
3 replies
semgov's avatar

Same question here. We love the forge/do combo but the only issue we have right now is sending/receiving mails through a decent/nonspammy mailserver. Maybe there's an external service we could use? Any suggestions?

Loriko's avatar
Loriko
OP
Best Answer
Level 1

@semgov if you haven't figured it out yet, i found the solution to my problem. I had to change the DNS settings in digitalocean. And i needed to point the nameservers from my domainname registration company to the ones that match digital ocean. How you can do that can you find here: https://www.digitalocean.com/community/tutorials/how-to-point-to-digitalocean-nameservers-from-common-domain-registrars

Good luck and let me know if it helped you!

phred's avatar

We use Mailgun for our transactional mails — i.e., welcome emails, password resets, receipts, order status updates, etc. and have had no issues.

Mandrill is another great option, as is Sendgrid. All of these are free for low volumes, which is < ~10k emails per month depending on the service. You can even send through a Gmail account though you're capped at 500/day.

As a recovering sysadmin I highly recommend not running your own mail server. Any of these services provides you with SMTP credentials you can drop into your Laravel configuration, no fuss. Running a mail server entails keeping your sending IP clean, staying off of blacklists, DKIM & SPF, spam filtering, and more — all things that these services manage at an extremely cost effective price. How much is your time worth? Or, put another way, how much of your life do you want to spend troubleshooting email vs building your app?

If you need any more reasons to kill your email server I wrote a post a while back. :) Good luck!

6 likes

Please or to participate in this conversation.