5 posts by 2 authors in: Forums > CMS Builder
Last Post: September 19, 2017   (RSS)

Hello,

Is there a recommended way to create contact forms that can save data in cmsBuilder and send an email with the entry data to a specified email address? A plugin or at least some example code would be great!

Thank you,

Greg

Hi Greg, 

We'll probably add that in future but don't have a timeline for it now. 

In the meantime what you can do is use the PHP mail function directly: http://php.net/manual/en/function.mail.php

Of if you want to use CMSB functions you can do the following:

  • Add a new Email Template under: CMS Setup > Email Templates 
  • Go to: CMS Setup > Email Templates > Advanced Commands (bottom left) > Developers: Export Templates As PHP

That will generate the code to send a message with CMSB.  Note that this is getting into custom programming so we don't provide a lot of support on it.  But hopefully that's helpful!

Good luck!

Dave Edis - Senior Developer
interactivetools.com

Hi Dave,

Thanks for the reply.

The ability to define a "To" email address and a template email with the placeholders seems like a no-brainer to me. I look forward to seeing this at some point!

In the mean time, I will try the PHP code you suggest.

Thanks again,

Greg