0

I have set up my iredmail server at mail.rys.com (in this example ip 45.65.36.114). i have a website running laravel at rys.com. i also have installed let's encrypt - with separate instances on each server. i am able to send emails and add accounts fine via the provided email programs, but i need laravel to generate these and have had difficulty getting this to validate

i have tried a number of examples but have not had success. i haven't changed anything on the iredmail side and i can send mail from the admin@rys.com account but not via laravel

any help would be greatly appreciated.

Regards,

Peter

Config:

MAIL_DRIVER=smtp
MAIL_HOST=45.65.36.114
MAIL_PORT=587
MAIL_USERNAME=admin
MAIL_PASSWORD=xxxxx
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=admin@rys.com
MAIL_FROM_NAME="admin@rys.com"

Result: Swift_TransportException (530) Expected response code 250 but got code "530", with message "530 5.7.0 Must issue a STARTTLS command first "

Config:

MAIL_DRIVER=smtp
MAIL_HOST=45.65.36.114
MAIL_PORT=587
MAIL_USERNAME=admin
MAIL_PASSWORD=xxxxx
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=admin@rys.com
MAIL_FROM_NAME="admin@rys.com"

Result: stream_socket_enable_crypto(): Peer certificate CN=mail.rys.com' did not match expected CN=45.65.36.114'

Config:

MAIL_DRIVER=sendmail
MAIL_HOST=45.65.36.114
MAIL_PORT=587
MAIL_USERNAME=admin
MAIL_PASSWORD=xxxxx
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=admin@rys.com
MAIL_FROM_NAME="admin@rys.com"

Result: Swift_TransportException Expected response code 220 but got an empty response

Config:

MAIL_DRIVER=smtp
MAIL_HOST=45.65.36.114
MAIL_PORT=80
MAIL_USERNAME=admin
MAIL_PASSWORD=xxxxx
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=admin@rys.com
MAIL_FROM_NAME="admin@rys.com"

Result: Connection to 45.65.36.114:80 Timed Out

Pete
  • 312
  • 2
  • 3
  • 15

1 Answers1

0

This was solved in a similar by adding what's below to the mail config. Answer's towards the bottom but it got the job done in Laravel 6

how to fix stream_socket_enable_crypto(): SSL operation failed with code 1

'stream' => [
   'ssl' => [
      'allow_self_signed' => true,
      'verify_peer' => false,
      'verify_peer_name' => false,
   ],
],
Pete
  • 312
  • 2
  • 3
  • 15