Vvv: Mailcatcher e-mails without format

Created on 4 Jan 2018  路  8Comments  路  Source: Varying-Vagrant-Vagrants/VVV


Expected Behavior



MailCatcher to display formatted e-mails.

Current Behavior



MailCatcher displaying unformatted e-mails.
Headers:

Return-Path: <help@***.co>
Date: Thu, 04 Jan 2018 22:26:53 +0000
From: Realty Butler <help@***.co>
To: Deiva Magalhaes <deiva@***.co>
Message-ID: <[email protected]>
Subject: Saved Search Report
Mime-Version: 1.0
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-PHP-Originating-Script: 33:class-phpmailer.php
X-Mailer: PHPMailer 5.2.22 (https://github.com/PHPMailer/PHPMailer)
X-RB-Unique: rb_mail_sent_97f236d8d1c8d750a98f1fc4828dc519

Possible Solution



Updating MailCatcher (it is 2 versions behind).

Steps to Reproduce (for bugs)


  1. Send an HTML e-mail from VVV.
  2. Check the e-mail on MailCatcher.

Context



Test formatted e-mails sent by my local WordPress.

Your Environment

  • VVV version: v2.1.0
  • VVV Git Branch: master
  • Vagrant version: 2.0.0
  • VM Provider name: VirtualBox
  • VM Provider version: 5.1.28 r117968 (Qt5.6.2)
  • Operating System and version: macOS High Sierra 10.13.2 (17C88)
bug core

Most helpful comment

I wonder if a test email block in the dashboard would be useful? Or a debugging block, I'll have a think

All 8 comments

Is anybody else having this issue?

mailcatcher is installed in provision/provision.sh, that would be the place to update it. But first, try to replicate using the latest commit on the develop branch to verify this hasn't already been fixed

  mailcatcher_version="$(/usr/bin/env mailcatcher --version 2>&1 | grep 'mailcatcher ' | cut -d " " -f 2)"
  if [[ -n "${mailcatcher_version}" ]]; then
    pkg="Mailcatcher"
    print_pkg_info "$pkg" "$mailcatcher_version"
  else
    echo " * Mailcatcher [not installed]"
    /usr/bin/env rvm default@mailcatcher --create do gem install mailcatcher --no-rdoc --no-ri
    /usr/bin/env rvm wrapper default@mailcatcher --no-prefix mailcatcher catchmail
  fi

It could well be that mailcatcher has been updated since you last reprovisioned. A fresh box will probably resolve the problem, but in the meantime if it's already installed, VVV should attempt to update mailcatcher rather than just print out the version

I was able to update my MailCatcher to 0.6.5, but still can't see formatted HTML e-mails. 馃槥

For future reference, I've updated it by changing provision.sh to update it even if mailcatcher_version is not null, instead of just printing the version.

I will now check it in develop branch.

Can you post the diff or do a PR for that change?

Also can you provide more information about how things are broken? I understand it doesn't work but you've said nothing about what that means, e.g. Does mailcatcher only show a subset of HTML tags correctly? Does it show raw HTML tags rather than HTML rich output? Does that tab simply not exist for those emails? Does it show the email but with all html elements stripped out?

Details, examples and screenshots welcome. Also any output in the JS console

It shows the email with the HTML elements stripped out. After manually testing it by calling mail() directly, I realized it is actually something in my WP plugin, so I will close this ticket. I apologize for wasting your time and thank you for your help, @tomjn.

I wonder if a test email block in the dashboard would be useful? Or a debugging block, I'll have a think

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

neilgee picture neilgee  路  4Comments

tomjn picture tomjn  路  3Comments

ryanfurtner picture ryanfurtner  路  3Comments

rwrobe picture rwrobe  路  4Comments

sirbrillig picture sirbrillig  路  5Comments