It would be useful to be able to set a custom subject when sending a test e-mail.

Patch on the way...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mcdruid’s picture

Patch for the 7.x-1.x branch.

mcdruid’s picture

First patch used the wrong variable to set the default_value for the new subject field - fixed.

wundo’s picture

Status: Needs review » Postponed (maintainer needs more info)

Do we really need a subject for that? I'm not really sure about the this.

mcdruid’s picture

Here's an example use case: you might want to use a service such as www.checktls.com to verify whether your e-mail is using TLS end-to-end. For this you need to set a custom subject in your test e-mails.

mcdruid’s picture

Status: Postponed (maintainer needs more info) » Needs review

(Should have changed the status on this)

DamienMcKenna’s picture

Rerolled, and added a variable_del() line to smtp_uninstall().

Status: Needs review » Needs work

The last submitted patch, 6: smtp-n1870166-6.patch, failed testing.

DamienMcKenna’s picture

DamienMcKenna’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 6: smtp-n1870166-6.patch, failed testing.

DamienMcKenna’s picture

The tests pass, so marking this "needs review".

DamienMcKenna’s picture

Status: Needs work » Needs review
Anonymous’s picture

I qued for retest.

Anonymous’s picture

Works great for me. Terminal image included.

Chris Matthews’s picture

Status: Needs review » Needs work
Issue tags: +Needs rework, +Needs reroll

The 3 year old patch in #6 does not apply to the latest 7.x-1.x development snapshot and may be too old to reroll, but I went ahead and tagged the issue accordingly.

Checking patch smtp.admin.inc...
error: while searching for:

  // If an address was given, send a test e-mail message.
  $test_address = variable_get('smtp_test_address', '');
  if ($test_address != '') {
    // Clear the variable so only one message is sent.
    variable_del('smtp_test_address');
    global $language;
    $params['subject'] = t('Drupal SMTP test e-mail');
    $params['body']    = array(t('If you receive this message it means your site is capable of using SMTP to send e-mail.'));
    drupal_mail('smtp', 'smtp-test', $test_address, $language, $params);

error: patch failed: smtp.admin.inc:155
error: smtp.admin.inc: patch does not apply
Checking patch smtp.install...
error: while searching for:
  variable_del('smtp_queue');
  variable_del('smtp_queue_fail');
  variable_del('smtp_test_address');
  variable_del('smtp_username');
  variable_del('smtp_debugging');

error: patch failed: smtp.install:28
error: smtp.install: patch does not apply