So if I use a CCK field token for sender or recipient it should work, right? Because if I use a token in one of those fields I get this:

Please enter a valid e-mail address for recipient.

This issue moved from #501722: HTML mail actions for Rules



sgabe’s picture

Status:Active» Needs review
new2.76 KB

Please try the attached patch.

criz’s picture

When got this mimemail_rules_action_mail_validate() introduced?
Because of tokens and php evaluation we moved all validation to mimemail_rules_form_settings_process(). What about validating emails there? In this state php evaluation and tokens should be applied.

Don't forget that also php evaluation should be supported.

sgabe’s picture

new1.99 KB

Holy... You're right. I moved this segment here from the Drupal action form, but I see I shouldn't have. I guess it will be just simply removed.

butler360’s picture

Sorry, I don't follow what you're saying above. If I want to use tokens for sender and receiver do I apply the patch in #3? And are there any side-effects?

sgabe’s picture

The patch removes the validation. The only side-effect is that you can enter an invalid e-mail address in the form, but I think in the most cases you will use tokens and PHP evaluation, so the validation is needless. Note that Rules actions doesn't use this kind of validation by default.

butler360’s picture

OK, sorry for the delay, but the patch applies just fine and it seems to work. Thanks!

sgabe’s picture

Status:Needs review» Fixed

Committed to DRUPAL-6--1 branch, will be available in the development snapshot soon. Sorry for the inconvenience fellas.

Status:Fixed» Closed (fixed)

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