1

I've created a content type with an email field. Anonymous users are allowed to create these nodes. I've created a Rule that sends an email message to the value submitted in the node's email field, using a replacement pattern. Rules tries to send the email to a mailto: link, not to the email address. The outgoing mail fails with the sendmail error: "Cannot mail directly to files", because it is addressing the email to the link, not the address.

  • You probably need to use the raw value of the field in the rules configuration. Just as a best practice though since you are opening me to getting even more spam mail, are you adding captcha to this form? (That is only a half joke lol) – burnsjeremy Jul 10 '15 at 15:03
  • Thanks very much! For those following along at home, you need to click the button that says "Switch to Data Selection" and choose the Data Selector corresponding to your email field, not the Replacement Pattern. And yes, I will be adding the Honeypot module. – jaxond Jul 10 '15 at 15:41
0

Click the button that says "Switch to Data Selection" and choose the Data Selector corresponding to your email field, not the Replacement Pattern.

That way the Rules module will send the email to the actual email address, instead of to the 'mailto:'-link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.