Hi .. just noticed something while using this module ..

Some of the entries in my cck email field have been let in with a trailing space bar (cck validation seems to allow this in the email field). When these are in the set of selected nodes to send an email to, a validation error like this appears:

'The field used for recipient's E-mail node_data_field_per_email_field_per_email_email contains 1 invalid E-mail addresses from a total of 139 selected'

Now i realise that input validation would be ideal (though sometimes keeping the forms friendly and forgiving is nice too) but i think the module should be able to deal with a small validation error like this just using the php trim function.

I hope this is simple enough to fix, and thanks for a great module so far!

Paul

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mzwyssig’s picture

Same issue here, although this might actually be an issue from the CCK email field ?

I opened an issue here : http://drupal.org/node/1040626

DrewMathers’s picture

Status: Active » Fixed

I got the same error and assumed it was caused by either the CCK Email Field or Views inserting HTML code around the email address. Though I didn't bother to hack the database and look.

The workaround that works for me is to edit the view and select [x] Strip HTML tags in the Views field configuration for the email address field. If this doesn't work for you, change issue status back to active.

Status: Fixed » Closed (fixed)

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

Gabriel R.’s picture

Status: Closed (fixed) » Active

The issue is still occurring, even when the option Strip HTML tags is enabled on the email field.
I can think of two better ways to deal with this, either:

* Report the incorrect email addresses in the message.
* Go ahead and do it anyway, skipping the incorrect addresses.

Gabriel R.’s picture

Title: trailing space causes validation error » Fail gracefully in case of "The field used for recipient's E-mail FIELD contains X invalid E-mail addresses from a total of Y"

Updated title for better failover.

Gabriel R.’s picture

Here's a patch that makes error message more useful, showing the first 100 incorrect addresses and the text [empty] if the address is missing.

Gabriel R.’s picture

Status: Active » Needs review
liquidcms’s picture

FileSize
1.66 KB

better patch

styrbaek’s picture

I just tryed Views Send on a clean install of Drupal 6, and got this error.
Tryed both the .dev and .alpha2 versions and stil got the error.

Get this error when I try to install the patch:

(Stripping trailing CRs from patch.)
patching file views_send.module
Hunk #1 succeeded at 225 (offset -8 lines).
patch unexpectedly ends in middle of line
Hunk #2 FAILED at 257.
1 out of 2 hunks FAILED -- saving rejects to file views_send.module.rej
sdr-omme.dk@webc2:~/web/sandbox/sites/all/modules/views_send$ patch < views_send-invalid-addresses.module.patch
patching file views_send.module
Hunk #1 FAILED at 259.
1 out of 1 hunk FAILED -- saving rejects to file views_send.module.rej

Tryed all this and still get the error:
CCK email field
CCK text field
Global text field in Views
Stripping html

hansfn’s picture

The patch is outdated.

styrbaek’s picture

Am I the only one who still have this problem?

hansfn’s picture

If your problem is that fields unexpectedly don't work, see #1630928: Only user email field works in stead. (Comment in that thread - include version of VBO and Views and field type.)

styrbaek’s picture

Thanks, I just posted my solution on the problem on #1630928: Only user email field works

I made a little chance in line 904 om views_send.module

FROM
$views_value = $views_result->{'node_data_field_text_' . $field};

TO
$views_value = $views_result->{'node_data_field_' . $key . '_' . $field};

I all so changed line 320 to fix a problem with Tokens

FROM
$token_values[] = $context['row']->{'node_data_field_text_' . $field_key};

WITH
$token_values[] = $context['row']->{'node_data_'.$field_name.'_'.$field_key};

hansfn’s picture

Thx a lot for finding a solution and posting it in the other thread, but here it's just noise (because it's off-topic).

styrbaek’s picture

Sorry I'll try to remember :-)

hansfn’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

No more development on the D6 version.