ralee
3596
13
Servers

Email - Connection refused #111

Posted 4 years ago by ralee

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]

  1. I have called Godaddy and they have enabled remote email
  2. ports are not blocked.

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 sign in or create an account to participate in this conversation.