{"id":2209,"date":"2024-09-02T11:38:48","date_gmt":"2024-09-02T11:38:48","guid":{"rendered":"https:\/\/www.devopssupport.in\/blog\/?p=2209"},"modified":"2024-09-14T07:35:49","modified_gmt":"2024-09-14T07:35:49","slug":"fixing-the-symfony-mailer-transportexception-connection-timeout-error","status":"publish","type":"post","link":"https:\/\/www.devopssupport.in\/blog\/fixing-the-symfony-mailer-transportexception-connection-timeout-error\/","title":{"rendered":"Laravel SMTP Mailer TransportException: Connection Timeout Error"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"403\" src=\"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2024\/09\/image-3-1024x403.png\" alt=\"\" class=\"wp-image-2213\" srcset=\"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2024\/09\/image-3-1024x403.png 1024w, https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2024\/09\/image-3-300x118.png 300w, https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2024\/09\/image-3-768x302.png 768w, https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2024\/09\/image-3-1536x604.png 1536w, https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2024\/09\/image-3.png 1845w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>While working on a project that involved sending emails through Amazon SES (Simple Email Service) using Symfony, I encountered a frustrating error. It looked something like this:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Root Cause<\/strong><\/h3>\n\n\n\n<p>After reviewing the configuration, I realized that the error was due to a typo in my <code>.env<\/code> file where the <code>MAIL_PORT<\/code> was incorrectly set. I had mistakenly set <code>MAIL_PORT=<\/code>111 instead of the correct value <code>MAIL_PORT=111<\/code>. Port 222 is typically used for SMTP submission, while port 111 is incorrect, leading to the connection failure.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>The Solution<\/strong><\/h3>\n\n\n\n<p>To resolve this issue, I corrected the <strong><code>MAIL_PORT<\/code> <\/strong>in my <code>.<\/code><strong><code>env<\/code> <\/strong>file<\/p>\n\n\n\n<p>After making this change, the connection to the SMTP server was successfully established, and the emails were sent without any issues.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>More topics on Bug fixing:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-devops-support wp-block-embed-devops-support\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"r7S2kN7AFU\"><a href=\"https:\/\/www.devopssupport.in\/blog\/mysql-error-1932-table-doesnt-exist-in-engine\/\">MySQL Error #1932: &#8220;Table Doesn&#8217;t Exist in Engine&#8221;<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;MySQL Error #1932: &#8220;Table Doesn&#8217;t Exist in Engine&#8221;&#8221; &#8212; DevOps Support\" src=\"https:\/\/www.devopssupport.in\/blog\/mysql-error-1932-table-doesnt-exist-in-engine\/embed\/#?secret=z9PwHlZzRR#?secret=r7S2kN7AFU\" data-secret=\"r7S2kN7AFU\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-devops-support wp-block-embed-devops-support\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"C3bWvnZCmM\"><a href=\"https:\/\/www.devopssupport.in\/blog\/neterr_incomplete_chunked_encoding-200-ok\/\">net::ERR_INCOMPLETE_CHUNKED_ENCODING 200 (OK)<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;net::ERR_INCOMPLETE_CHUNKED_ENCODING 200 (OK)&#8221; &#8212; DevOps Support\" src=\"https:\/\/www.devopssupport.in\/blog\/neterr_incomplete_chunked_encoding-200-ok\/embed\/#?secret=fvm03SdVI5#?secret=C3bWvnZCmM\" data-secret=\"C3bWvnZCmM\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-devops-support wp-block-embed-devops-support\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"FuDjny942a\"><a href=\"https:\/\/www.devopssupport.in\/blog\/fixing-429-too-many-requests-in-laravel\/\">Fixing 429 Too Many Requests in Laravel<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Fixing 429 Too Many Requests in Laravel&#8221; &#8212; DevOps Support\" src=\"https:\/\/www.devopssupport.in\/blog\/fixing-429-too-many-requests-in-laravel\/embed\/#?secret=jmdKsNLCSJ#?secret=FuDjny942a\" data-secret=\"FuDjny942a\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-devops-support wp-block-embed-devops-support\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"ni0cCmljvb\"><a href=\"https:\/\/www.devopssupport.in\/blog\/1834-2\/\">Resolving the &#8216;type &#8216;Null&#8217; is not a subtype of type &#8216;String&#8221; Error in Flutter<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Resolving the &#8216;type &#8216;Null&#8217; is not a subtype of type &#8216;String&#8221; Error in Flutter&#8221; &#8212; DevOps Support\" src=\"https:\/\/www.devopssupport.in\/blog\/1834-2\/embed\/#?secret=XPDT81dUev#?secret=ni0cCmljvb\" data-secret=\"ni0cCmljvb\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-devops-support wp-block-embed-devops-support\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"ZlKQIe1xTo\"><a href=\"https:\/\/www.devopssupport.in\/blog\/solving-the-libandroid-emu-metrics-dll-not-found-error-in-android-development\/\">Solving the \u201clibandroid-emu-metrics.dll Not Found\u201d Error in Android Development<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Solving the \u201clibandroid-emu-metrics.dll Not Found\u201d Error in Android Development&#8221; &#8212; DevOps Support\" src=\"https:\/\/www.devopssupport.in\/blog\/solving-the-libandroid-emu-metrics-dll-not-found-error-in-android-development\/embed\/#?secret=Rx4wqIK4aE#?secret=ZlKQIe1xTo\" data-secret=\"ZlKQIe1xTo\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-devops-support wp-block-embed-devops-support\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"JcrR40kh4r\"><a href=\"https:\/\/www.devopssupport.in\/blog\/resolving-flutter-target-file-lib-main-dart-not-found-issue\/\">Resolving &#8220;Flutter: Target file &#8216;lib\/main.dart&#8217; not found&#8221; Issue<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Resolving &#8220;Flutter: Target file &#8216;lib\/main.dart&#8217; not found&#8221; Issue&#8221; &#8212; DevOps Support\" src=\"https:\/\/www.devopssupport.in\/blog\/resolving-flutter-target-file-lib-main-dart-not-found-issue\/embed\/#?secret=21nkI8fHVh#?secret=JcrR40kh4r\" data-secret=\"JcrR40kh4r\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-devops-support wp-block-embed-devops-support\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"6NHMGfT1bX\"><a href=\"https:\/\/www.devopssupport.in\/blog\/troubleshooting-laravel-laravel-emergency-unable-to-create-configured-logger-using-emergency-logger\/\">Troubleshooting Laravel: &#8220;laravel.EMERGENCY: Unable to create configured logger. Using emergency logger.&#8221;<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Troubleshooting Laravel: &#8220;laravel.EMERGENCY: Unable to create configured logger. Using emergency logger.&#8221;&#8221; &#8212; DevOps Support\" src=\"https:\/\/www.devopssupport.in\/blog\/troubleshooting-laravel-laravel-emergency-unable-to-create-configured-logger-using-emergency-logger\/embed\/#?secret=N8ve9HgwXY#?secret=6NHMGfT1bX\" data-secret=\"6NHMGfT1bX\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-devops-support wp-block-embed-devops-support\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"6IBNtnVjvx\"><a href=\"https:\/\/www.devopssupport.in\/blog\/type-null-is-not-a-subtype-of-type-string-errors\/\">&#8216;type &#8216;Null&#8217; is not a subtype of type &#8216;String&#8217; Errors<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;&#8216;type &#8216;Null&#8217; is not a subtype of type &#8216;String&#8217; Errors&#8221; &#8212; DevOps Support\" src=\"https:\/\/www.devopssupport.in\/blog\/type-null-is-not-a-subtype-of-type-string-errors\/embed\/#?secret=vO6Qzu0VRB#?secret=6IBNtnVjvx\" data-secret=\"6IBNtnVjvx\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-devops-support wp-block-embed-devops-support\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"7N7JuN5syu\"><a href=\"https:\/\/www.devopssupport.in\/blog\/building-elegant-multiple-select-dropdown-lists-in-flutter\/\">Building Elegant Multiple Select Dropdown Lists in Flutter<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Building Elegant Multiple Select Dropdown Lists in Flutter&#8221; &#8212; DevOps Support\" src=\"https:\/\/www.devopssupport.in\/blog\/building-elegant-multiple-select-dropdown-lists-in-flutter\/embed\/#?secret=JRtLJxfaaW#?secret=7N7JuN5syu\" data-secret=\"7N7JuN5syu\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-devops-support wp-block-embed-devops-support\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"JeH5SuRc1P\"><a href=\"https:\/\/www.devopssupport.in\/blog\/platformexception-read_external_storage_denied-in-flutter\/\">PlatformException: read_external_storage_denied in Flutter<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;PlatformException: read_external_storage_denied in Flutter&#8221; &#8212; DevOps Support\" src=\"https:\/\/www.devopssupport.in\/blog\/platformexception-read_external_storage_denied-in-flutter\/embed\/#?secret=6RLSCY0Yaz#?secret=JeH5SuRc1P\" data-secret=\"JeH5SuRc1P\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>While working on a project that involved sending emails through Amazon SES (Simple Email Service) using Symfony, I encountered a frustrating error. It looked something like this:&#8230; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1612],"tags":[1985,1987,1091,322,1986,1991,856,1988,1982,35,1989,1984,103,1990,1983,675],"class_list":["post-2209","post","type-post","status-publish","format-standard","hentry","category-laravel-tutorial","tag-amazon-ses","tag-connection-timeout","tag-debugging","tag-devops","tag-email-configuration","tag-email-errors","tag-environment-variables","tag-mail_port","tag-mailer","tag-php","tag-php-8-2","tag-smtp","tag-symfony","tag-symfony-errors","tag-transportexception","tag-web-development"],"_links":{"self":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts\/2209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/comments?post=2209"}],"version-history":[{"count":3,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts\/2209\/revisions"}],"predecessor-version":[{"id":2278,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts\/2209\/revisions\/2278"}],"wp:attachment":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/media?parent=2209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/categories?post=2209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/tags?post=2209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}