Forum

Thread tagged as: Question, Problem, Shop

Order paid email does not send

Hello,

I am trying to send an automatic e-mail when an order is paid, but it is not sending. I have an order_paid.html template. I have enabled the email for order paid. And when sending a test e-mail from the 'Email' in settings it is working.

Perch and all add-ons are up to date.

Diagnostic report:

Perch: 3.1.1
Production mode: (PERCH_DEVELOPMENT)
Installed apps: content (3.1.1), assets (3.1.1), categories (3.1.1), perch_blog (5.6.1), perch_forms (1.11), perch_shop_orders (1.2.6), perch_shop_products (1.2.6), perch_shop (1.2.6), perch_members (1.6.4)
DB driver: PDO
DB tables: perch3_blog_authors (1), perch3_blog_comments (0), perch3_blog_index (141), perch3_blog_posts (4), perch3_blog_posts_to_tags (0), perch3_blog_sections (1), perch3_blog_tags (0), perch3_blog_webmention_queue (0), perch3_blogs (1), perch3_categories (3), perch3_category_counts (2), perch3_category_sets (2), perch3_content_index (6), perch3_content_items (4), perch3_content_regions (1), perch3_forms (1), perch3_forms_responses (2), perch3_members (3), perch3_members_forms (2), perch3_members_member_tags (0), perch3_members_sessions (1), perch3_members_tags (0), perch3_menu_items (14), perch3_navigation (0), perch3_navigation_pages (0), perch3_page_templates (1), perch3_pages (12), perch3_resource_log (45), perch3_resource_tags (0), perch3_resources (41), perch3_resources_to_tags (0), perch3_settings (39), perch3_shop_addresses (341), perch3_shop_admin_index (30), perch3_shop_brands (1), perch3_shop_cart (109), perch3_shop_cart_data (559), perch3_shop_cart_items (125), perch3_shop_countries (250), perch3_shop_currencies (152), perch3_shop_customers (79), perch3_shop_emails (1), perch3_shop_index (1162), perch3_shop_option_values (5), perch3_shop_options (2), perch3_shop_order_items (105), perch3_shop_order_promotions (0), perch3_shop_order_statuses (9), perch3_shop_orders (79), perch3_shop_orders_meta (1), perch3_shop_product_files (0), perch3_shop_product_option_values (2), perch3_shop_product_options (2), perch3_shop_product_tags (0), perch3_shop_products (19), perch3_shop_promotions (0), perch3_shop_sales (0), perch3_shop_search (13), perch3_shop_shipping_zone_countries (0), perch3_shop_shipping_zones (1), perch3_shop_shippings (1), perch3_shop_tax_exhibits (215), perch3_shop_tax_group_rates (1), perch3_shop_tax_groups (1), perch3_shop_tax_locations (1), perch3_shop_tax_rates (0), perch3_shop_variants (16), perch3_user_passwords (0), perch3_user_privileges (81), perch3_user_role_privileges (2), perch3_user_roles (2), perch3_users (1)
Users: 1
App runtimes:
<?php
    $apps_list = [ 'perch_blog', 'perch_members', 'perch_shop', 'perch_forms', 'mollie'
    ];
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins), publish_posts (1 mins), process_webmentions (1 mins)
Editor plug-ins:
H1: 1056a9c7984e4f1fa4aa7b7a19d7cc40
L1: 9f6be340d2ee2885c5b2451b62d8ef1e
F1: 3b606135b33e6a102526838f4152a807
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: nl-nl
installedAt: 3.0.14
update_3.0.14: done
latest_version:
on_sale_version: 3.1.1
perch_blog_update: 5.6
perch_blog_post_url: /blog/{postSlug}
headerScheme: light
perch_blog_site_name:
perch_blog_slug_format: {postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
dashboard: 0
sidebar_back_link: 0
hide_pwd_reset: 0
keyboardShortcuts: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
content_skip_region_list: 0
assets_restrict_buckets: 0
perch_blog_comment_notify: 0
perch_blog_webmention_tx: 0
perch_blog_webmention_rx: 0
perch_shop_update: 1.2.6
perch_members_login_page: /members/login.php?r={returnURL}
perch_shop_price_tax_mode: exc
perch_shop_site_url: https://
perch_shop_product_url: /shop/{slug}
perch_shop_default_currency: 44
perch_shop_reporting_currency: 44
perch_shop_invoice_number_format: Invoice%d
perch_members_update: 1.4
update_3.1.1: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: kndrxwbst_msksnl
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: kndrxwbst_msksnl
PERCH_DB_PREFIX: perch3_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: info@moeskas.nl
PERCH_EMAIL_FROM_NAME: Moeskas
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/kndrxwbst/domains/kendrix.website/public_html/moeskas/perch
PERCH_CORE: /home/kndrxwbst/domains/kendrix.website/public_html/moeskas/perch/core
PERCH_RESFILEPATH: /home/kndrxwbst/domains/kendrix.website/public_html/moeskas/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_DEBUG: 1
PERCH_PRODUCTION_MODE: PERCH_DEVELOPMENT
PERCH_EMAIL_METHOD: smtp
PERCH_EMAIL_HOST: smtp.gmail.com
PERCH_EMAIL_SECURE: tls
PERCH_EMAIL_AUTH: 1
PERCH_EMAIL_PORT: 587
PERCH_EMAIL_USERNAME: info@moeskas.nl
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_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_ASSET_VERSION: 8255e4c4a367cfa3e2bd
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /home/kndrxwbst/domains/kendrix.website/public_html/moeskas/perch/templates
PERCH_TEMPLATE_FILTERS:
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_XHTML_MARKUP:
PERCH_RWD: 1
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_DEFAULT_BUCKET: default
PERCH_TRANSLATION_ASSIST:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_PRIV_ASSIST:
PERCH_CUSTOM_EDITOR_CONFIGS:
PERCH_ENABLE_EXIF: 1
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SHOP_VERSION: 1.2.6
PERCH_APPS_EDITOR_PLUGIN: markitup
PERCH_APPS_EDITOR_MARKUP_LANGUAGE: markdown
Hosting settings
PHP: 7.0.30
Zend: 3.0.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $
MySQL server: 5.5.5-10.2.15-MariaDB
Free disk space: 70,73 GB
Extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, calendar, ctype, curl, dom, fileinfo, filter, ftp, gd, gettext, hash, iconv, SPL, intl, json, mbstring, mcrypt, session, standard, mysqlnd, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, mysqli, SimpleXML, soap, sockets, imap, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, cgi-fcgi, ionCube Loader
GD: Yes
ImageMagick: No
PHP max upload size: 64M
PHP max form post size: 64M
PHP memory limit: 128M
Total max uploadable file size: 64M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
PWD: /usr/local/safe-bin
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/?extended
QUERY_STRING: extended
REQUEST_METHOD: GET
SERVER_PROTOCOL: HTTP/1.1
GATEWAY_INTERFACE: CGI/1.1
REMOTE_PORT: 50816
SCRIPT_FILENAME: /home/kndrxwbst/domains/kendrix.website/public_html/moeskas/perch/core/settings/diagnostics/index.php
SERVER_ADMIN: webmaster@kendrix.website
CONTEXT_DOCUMENT_ROOT: /home/kndrxwbst/domains/kendrix.website/public_html/moeskas
REQUEST_SCHEME: http
DOCUMENT_ROOT: /home/kndrxwbst/domains/kendrix.website/public_html/moeskas
REMOTE_ADDR: 31.160.4.226
SERVER_PORT: 80
SERVER_ADDR: 185.224.88.110
SERVER_NAME: moeskas.kendrix.website
SERVER_SOFTWARE: Apache/2
HTTP_COOKIE: __sharethis_cookie_test__=1; p_m=95a26ce2e4699d320e3db884a8cbe488b5f454e7; PHPSESSID=chrkobrp4t3rg96eugt0oihdl4; cmsa=1; __unam=3cdad73-163219586b8-64eed229-2339
HTTP_ACCEPT_LANGUAGE: nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_REFERER: https://moeskas.kendrix.website/perch/core/settings/diagnostics/
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_CONNECTION: close
HTTP_HOST: moeskas.kendrix.website
UNIQUE_ID: W0djQNiwv1KqtRh8MDEvagAAAIA
FCGI_ROLE: RESPONDER
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1531405120,0825
REQUEST_TIME: 1531405120
Mike Hendriks

Mike Hendriks 0 points

  • 3 years ago

Did you try putting the template in the perch addon folder AND in the templates folder?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you tested with something like Mailtrap to be sure that it's that the email isn't be sent rather than just not received?

Hi Drew,

Sorry for the late response, but yes I have tested with Mailtrap, and they are just not being sent.

Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

Hi Mike,

If you go to the email settings via the control panel, there's a field labelled "Enabled". Is it set to yes?

Yes it is enabled for order paid.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you tested with the manual gateway?

I did not. Tried it now with the manual gateway and it is working. Do you know where the problem could be?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Which gateway are you using when it doesn't work?

I am using my own implemented Mollie gateway. Everything is working fine, the order status is paid in the order app and in the database. Could it be a function in the gateway class that I have to add?

Drew McLellan

Drew McLellan 2638 points
Perch Support

It sounds like it's something in your gateway to me.

Yes, I also think so. Can you tell me what function is responsible for sending the email once the status is changed to paid in the database?

When I create and enable the 'order created' email, it does send an e-mail when an order is created. So now my problem is still with a paid order.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you using finalize_as_paid()? If your gateway doesn't ever update the order status then the events won't fire and the email won't go out.