Dont know which problem this is but:
Why dont you use an awesome free service like mailgun or mandrill for sending emails?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi i am stuck for awhile now, hoping some one can help me out here.
I have these configurations on my homestead which works fine, its succesfully sending emails
//config/mail.php
'driver' => env('MAIL_DRIVER', 'smtp'),
'host' => env('MAIL_HOST', 'smtp.office365.com'),
'port' => env('MAIL_PORT', 587),
'from' => ['address' => 'info@minghan.sg', 'name' => 'Minghan'],
'encryption' => 'tls',
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'sendmail' => '/usr/sbin/sendmail -bs',
'pretend' => false,
//.env
MAIL_DRIVER=smtp
MAIL_HOST=smtp.office365.com
MAIL_PORT=587
MAIL_USERNAME=***********
MAIL_PASSWORD=***********
But when i put the site onto my live server (Godaddy - Shared Hosting) it stopped working and returns this error instead - Connection could not be established with host smtp.office365.com [Connection refused #111]
I am quite lost at the moment & I chance upon this http://stackoverflow.com/questions/15649193/swiftmail-smtp-error
-> Apparently the problem is that there is no mail server installed. So you have to find the server of your choice and to install it. I used postfix and installed it in the following way: sudo apt-get install postfix.
Should i try this? I am not a expert in linux. I am afraid i might screw up my server.
Is there anyone with similar experience? Please guide me through.
Thanks in advance!
Cheers, Ralee
Please or to participate in this conversation.