Sterc / FormIt

A dynamic form processing Snippet for MODX Revolution
https://docs.modx.com/current/en/extras/formit
33 stars 58 forks source link

emailFrom #51

Closed alexcua closed 8 years ago

alexcua commented 9 years ago

System defaults to the emailsender system setting even if the emailFrom is specified. If I have emailFrom and emailFromName both set, the emailFromName is used but not emailFrom. My site is hosted by modxcloud.

Bumme commented 9 years ago

@alexcua Could you send me the FormIt call?

alexcua commented 9 years ago

[[!FormIt? &hooks=email &emailFrom=[[+email]] &emailFromName=[[+pagetitle]] &emailTo=[[+tv.Email_Address]] &emailToName=[[+pagetitle]] &emailCC=[[+email]] &emailCCName=[[+name]] &emailBCC=alexcua@icloud.com &emailBCCName=Administrator &emailReplyTo=[[+email]] &emailReplyToName=[[+name]] &emailTpl=tpl_Contact &emailUseFieldForSubject=1 &clearFieldsOnSuccess = 1 &validate=name:required, email:email:required, subject:required, text:required:stripTags &successMessage=`

Thank You Very Much

Your message has been sent.

A copy will be emailed to the address provided. If you don't receive it in a few minutes, please check your spam folder.

`]]

Best Regards, Alexander Cua Roof Registry https://roofregistry.com/ Mobile: 404-509-5734

On Jun 16, 2015, at 2:25 AM, Wieger Sloot notifications@github.com wrote:

@alexcua https://github.com/alexcua Could you send me the FormIt call?

— Reply to this email directly or view it on GitHub https://github.com/modxcms/FormIt/issues/51#issuecomment-112308134.

joeke commented 8 years ago

Hi @alexcua How is the [[+email]] placeholder generated? Is that a field in your form? If so, then you could choose to omit the &emailFrom parameter since FormIt automatically searches for a form field with name="email" for the &emailFrom parameter. Another solution would be to use a custom hook to populate the &emailFrom parameter. See the rtfm for more info about this: https://rtfm.modx.com/extras/revo/formit/formit.hooks#FormIt.Hooks-CustomHooks

joeke commented 8 years ago

@alexcua Are you still experiencing this issue? Maybe setting the emailFrom parameter from a prehook would give better results: $formit =& $hook->formit; $formit->config['emailTo'] = 'emailaddress@domain.com';