"The entered e-mail address "[current-user:mail]" does not appear valid."

(See image)

This appears to have worked in 4.6 or 4.7 (not sure when it changed exactly, but it was working a couple months ago and we keep our modules pretty up-to-date).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DanChadwick’s picture

Version: 7.x-4.8 » 7.x-4.x-dev

Confirmed. This is a regression from #1873498: Email To does not permit recipient name.

Actually, this didn't really work properly before either. During validation, the tokens are replaced by the node's tokens. But it should be possible to use submission tokens too, such as [submission:values:email1], [submission:values:email2]. It isn't possible to know at e-mail definition time whether the tokens will be valid later.

DanChadwick’s picture

Status: Active » Fixed
FileSize
5.25 KB

This patch introduced a function signature change on two new functions introduced in 4.8. Since this version is recent, and since I don't think these two functions are likely to be used by other modules, I decided to make the signatures make more sense rather than be backward compatible. The argument $allow_tokens was added to:

function webform_email_validate(&$emails, $form_name, $allow_empty, $allow_multiple, $allow_tokens, $format = NULL) {}
function webform_valid_email_address(&$emails, $allow_tokens = FALSE, $format = NULL) {}

Committed to 7.x-4.x and 8.x.

  • DanChadwick committed 6c1fa01 on 8.x-4.x
    Issue #2494103 by DanChadwick: Fixed restore token use to email To and...
fenstrat’s picture

Version: 7.x-4.x-dev » 8.x-4.x-dev
Assigned: Unassigned » fenstrat
Status: Fixed » Active

This didn't factor in the token API changes in D8 as per #2493805: Convert token API calls to use token service. Fixing now.

  • fenstrat committed 1987d43 on 8.x-4.x
    Issue #2494103 by fenstrat: Follow up to correct D8 token calls.
    
fenstrat’s picture

Version: 8.x-4.x-dev » 7.x-4.x-dev

Committed and pushed to 8.x-4.x.

Appears this didn't actually get applied to 7.x-4.x, will commit #2 now.

fenstrat’s picture

Status: Active » Fixed

Hmm my bad, the commit to 7.x-4.x. doesn't show here in this issue nor in the d.o commit log https://www.drupal.org/node/7404/commits - bad d.o - however it was committed http://cgit.drupalcode.org/webform/commit/?id=835e990 - back to fixed.

mausolos’s picture

Thanks for the quick response, guys! I'll check it out this week.

DanChadwick’s picture

@fenstrat -- d.o has started to have issues when more than one branch is pushed at the same time. I've reported it, but there isn't much progress yet.

fenstrat’s picture

@DanChadwick right, any chance you could give me a link to that issue so I can chime in / follow?

DanChadwick’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.