Hey everyone, I’m having a hard time understanding how to send email through my PHP application Symfony. I installed Postfix (using this tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-as-a-send-only-smtp-server-on-ubuntu-18-04) and have tested to make sure that the mail can be sent through the console, and it can.
The trick now is to figure out what the proper URL is for my .env file to send emails (variable: MAILER_URL=smtp://localhost). This hasn’t sent anything.
What’s the approach here? Do I use anything specific to point to the right place to send emails?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there @pixelcommerce,
Are you getting any errors when you try to send the emails?
What I usually do is rather than running my own SMTP server, I use an SMTP solution like SendGrid or MailGun for my Laravel applications. That way I don’t have to set up and maintain a whole SMTP server for 1 website only.
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.