Forum
SMTP Connection() Error for Mailtrap / MAMP
Hello,
I'm trying to setup the forms app email function. I've successfully got the form app working, all the details are being recorded correctly on the forms app interface.
I've set up a mailtrap account now and I've altered the config.php file to suit the correct username / password for the mailtrap account.
However, when I try to send a test email from settings > email I get an error
SMTP connect() failed.
Can anyone advise where I'm going wrong?
Diagnostics report
PERCH INFORMATION
Perch: 2.8.6
Production mode: Production (100)
Installed apps: content (2.8.6), assets (2.8.6), categories (2.8.6), perch_forms (1.8.3), perch_gallery (2.8.6)
DB driver: PDO
DB tables: perch2_categories, perch2_category_counts, perch2_category_sets, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_forms, perch2_forms_responses, perch2_gallery_albums, perch2_gallery_image_versions, perch2_gallery_images, perch2_navigation, perch2_navigation_pages, perch2_page_templates, perch2_pages, perch2_resource_log, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users
Users: 1
App runtimes:
<?php
$apps_list = array(
'content',
'categories',
'perch_forms',
'perch_gallery',
);
Editor plug-ins: ace, ckeditor, markitup
H1: 421aa90e079fa326b6494f812ad13e79
L1: d8f430a8d29aa5ddec30e44617390bce
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: en-gb
update_2.8.5: done
latest_version: 2.8
on_sale_version: 2.8.6
update_2.8.6: done
headerScheme: light
dashboard: 0
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
logoPath: /perch/resources/ap2project-logo.png
perch_gallery_update: 2.8.5
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: root
PERCH_DB_SERVER: localhost:8889
PERCH_DB_DATABASE: woof-dubai
PERCH_DB_PREFIX: perch2_
PERCH_TZ: Asia/Dubai
PERCH_EMAIL_FROM: marc.jeffrey@ap2project.com
PERCH_EMAIL_FROM_NAME: Tania Richards
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/marc-jeffrey/Projects/WOOF/root/perch
PERCH_CORE: /Users/marc-jeffrey/Projects/WOOF/root/perch/core
PERCH_RESFILEPATH: /Users/marc-jeffrey/Projects/WOOF/root/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_EMAIL_METHOD: smtp
PERCH_EMAIL_HOST: mailtrap_host
PERCH_EMAIL_SECURE: tls
PERCH_EMAIL_AUTH: 1
PERCH_EMAIL_PORT: 2525
PERCH_EMAIL_USERNAME: 3519600f7b76c9351
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /Users/marc-jeffrey/Projects/WOOF/root/perch/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
HOSTING SETTINGS
PHP: 5.6.7
Zend: 2.6.0
OS: Darwin
SAPI: apache2handler
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $
MySQL server: 5.5.42
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, SPL, iconv, intl, json, ldap, mbstring, session, standard, mysqlnd, mysqli, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, mysql, SimpleXML, soap, sockets, exif, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, apache2handler, imap, gettext, mcrypt, yaz, pgsql, pdo_pgsql
GD: Yes
ImageMagick: No
PHP max upload size: 32M
PHP max form post size: 32M
PHP memory limit: 128M
Total max uploadable file size: 32M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
HTTP_HOST: localhost:8888
HTTP_CONNECTION: keep-alive
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36
HTTP_REFERER: https://localhost:8888/perch/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
HTTP_COOKIE: PHPSESSID=b27c8e336c5fb266623ab51c75097287; cmsa=1; _ga=GA1.1.1922225008.1431155935
PATH: /usr/bin:/bin:/usr/sbin:/sbin
SERVER_SOFTWARE: Apache
SERVER_NAME: localhost
SERVER_ADDR: ::1
SERVER_PORT: 8888
REMOTE_ADDR: ::1
DOCUMENT_ROOT: /Users/marc-jeffrey/Projects/WOOF/root
SERVER_ADMIN: you@example.com
SCRIPT_FILENAME: /Users/marc-jeffrey/Projects/WOOF/root/perch/core/settings/diagnostics/index.php
REMOTE_PORT: 55509
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /perch/core/settings/diagnostics/?extended
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1432107775.92
REQUEST_TIME: 1432107775
argc: 1
It sounds like the SMTP settings are wrong.
This is incorrect:
I would expect your config file to include something like
Thanks Drew!
Worked perfect!
Next issue... I tried the same setting on the live site and I'm getting the same error?
Is your host blocking that port?
Thanks Drew,
Just kept on trying random configuration settings and 1 eventually worked.
As you said it was a different port and also SSL instead.
Thanks again for your support!