use mail driver smtp ?
Can't get smtp working with Postmarkapp
I'm trying to set up transactional emails through Postmark, but hitting the following error:
Connection could not be established with host smtp.postmarkapp.com :stream_socket_client(): unable to connect to smtp.postmarkapp.com:587 (Connection refused) {"exception":"[object] (Swift_TransportException(code: 0): Connection could not be established with host smtp.postmarkapp.com :stream_socket_client(): unable to connect to smtp.postmarkapp.com:587 (Connection refused) at /home/ds8x2d76z4exc9ht/public_html/thedirectorsroom.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:269)
My config\mail.php settings are:
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'host' => env('MAIL_HOST', 'smtp.postmarkapp.com'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'auth_mode' => null,
],
My .env settings are:
MAIL_MAILER=smtp
MAIL_HOST=smtp.postmarkapp.com
MAIL_DRIVER=postmark
MAIL_USERNAME=ccccc18c-56cc-484f-adcd-12cc2ccc2999
MAIL_PASSWORD=ccccc18c-56cc-484f-adcd-12cc2ccc2999
MAIL_ENCRYPTION=NULL
[email protected]
MAIL_FROM_NAME="Rick Retzko"
POSTMARK_SECRET=ccccccc15c-55cc-484c-cccc-11cc9ccc1111
I had transactional emails previously set up on Mandrill, but am trying to switch to Postmark. I'm hosted on GoDaddy if that makes any difference. Any and all assistance is appreciated, Thanks!
Hi @snapey - Thanks for your help and suggestions! I’ve worked through the issues and am now processing emails through Postmark. The nut of the case seems to have been an inability on my production server to load coconutcraig/Laravel-postmark. My ISP (GoDaddy) provided no assistance other than to suggest that the vendor's software couldn’t be loaded on their server. GoDaddy's first-level support has gotten worse by the year and they dropped the line when trying to transfer me to their second-line support. I ended up downloading the production system to my local dev environment, loading coconutcraig/Laravel-postmark, tweaking the configs until I got it working and then uploading the new vendor files to the production server. A couple of refreshes later, it is working as expected. One point to note in case this can help someone else: The MAIL_ENCRYPTION setting on the .env file needed to be null, not TLS. Thanks for working on this with me.
Please or to participate in this conversation.