I can see that any field created in the view can be used in the email body text by way of a token. It would be nice if this could support rewriting of the field in the view.

I have a date field which is rewritten if empty. The email body doesn't show the rewritten text. Likewise rewriting the field when not empty doesn't work either. Instead of the rewritten text the email body just displays the formatted date field.

This would be a very powerful tool if rewriting worked.

Comments

sksmithson’s picture

Issue summary: View changes

Edited for clarity

esmith818’s picture

Issue summary: View changes

I just came across this issue in my own project. I collect first and last name separately in registration, but in View I rewrite last name field as concatenation of two. It displays correctly on Page but renders as last name only when using field in email. Since I do not have a full name field, I would love to have a way to pass the rewritten field value into the email message as well.

liquidcms’s picture

yes, this is a big issue for us as well for pretty much same reason listed. we have a set of 3 email fields which take each preceding one as the "no results" of the next. the view displays correctly; but Views Send bails saying not a valid email address.

Perhaps a PHP field to merge the 3 fields together? Trying that now.

liquidcms’s picture

Sadly, PHP field does not work either.

liquidcms’s picture

Priority: Normal » Major

marking this as major as this is pretty big short coming for this module; will look at creating a patch.

hansfn’s picture

Assigned: Unassigned » hansfn
Category: Feature request » Bug report

This is caused by a (bad) design decision at a point - solving a different problem. I'll revert that change and tackle the other problem in a different way.

I appreciate patches, but this one I will fix myself - in a week or two. Thx for posting example showing how badly it worked ;-)

liquidcms’s picture

Hey Hans,

Any idea when you might get to this and would some $$ get you there quicker? :)

My client needs this by the end of Mar and i thought i could use Rules/VBO to accomplish this but seems as though there is no way to pass View field results to a Rule either. So i am back to looking at Views Send as it seems closer - it at least knows about the fields. I can wait another week but then will need to look at fixing this myself (but would rather pay you to do it).

hansfn’s picture

Hi, liquidcms/Peter.

I'll start working on this on Friday morning. I should definitely be done by Saturday.

I would of course appreciate a donation for a couple of hours at a rate you decide - through Paypal to hansfn@gmail.com - but it's not a requirement at all. (I’m volunteering my own time. My normal day time work is not Drupal related.)

hansfn’s picture

Status: Active » Closed (fixed)

Some observations:

I'm closing this issue and will follow up in issue 2368533.