I want my drupal installation to send HTML mails (either custom css or theme css). So I installed mailsystem and html mail modules. But when I tried the test feature in HTML mail module, it resulted in HTTP 500 error. smtpmailsystem class works fine, smtp authentication is also working, plain text emails are being delivered normally. But HTMLmailsystem always returs http 500. I am stuck here. I have Drupal 7 running on Apache, windows, php 5.6.

Comments

VM’s picture

any errors being written to your server logs or is it a silent 500?

AshwinB’s picture

[Mon Jul 25 18:17:06.591347 2016] [:error] [pid 1488:tid 1048] [client 106.66.193.123:60135] PHP Fatal error: Call to undefined function mailsystem_html_to_text() in C:\\Apache24\\htdocs\\sites\\all\\modules\\htmlmail\\htmlmail.mail.inc on line 62, referer: http://<mysite>/admin/config/system/htmlmail/test

davewilly’s picture

Try the latest 7.x-2.x-dev version of HTML Mail module this should be fixed.
See - https://www.drupal.org/node/1692966

AshwinB’s picture

Dev version of HTML mail stopped 500 error on 'send test' page. But now it's saying 'Unable to send e-mails. Contact site administrator if problem persists'. Email are being successfully delivered only with smtpmailsystem. Following are my configs:

1. Mail System-
Site-wide default;

  • Delivery: smtpmailsystem
  • Formatting: htmlmailsystem

2. HTML Mail-

  • Email theme: No theme
  • Post-filtering: Full HTML

3. Send test-

  • email body: <text style="font-size:50px;">test</text></li>
  • text-format: Full HTML
  • Test-mail sending class: Defaultmailsystem & HTMLmailsystem returns 'Unable to send emails...' ; smtpmailsystem succeeds but emails are delivered as plain text.