Send mail using controller method
Permalink
I have a block with a (non-concrete) php file, but I need to use the send mail function.
I can't seem to do it out of this page because it's a non-concrete5 page.
Is there a way to send this data out of this file to another (concrete 5) file?
It would be great to send this using the controller, but I would rather not have to send it via $_GET if possible...
For example, is there a way to make a concrete5 page (one that is part of the rest of the concrete5 framework) that I can pass this along to...but not have to pass the data in a non-secure way...?
I can't seem to do it out of this page because it's a non-concrete5 page.
Is there a way to send this data out of this file to another (concrete 5) file?
$message = 'TEST MSSAGE'; $mh->setSubject($subject); $mh->setBody($message); $mh->to($mail); $mh->from($from, $fromName); $mh->sendMail();
It would be great to send this using the controller, but I would rather not have to send it via $_GET if possible...
For example, is there a way to make a concrete5 page (one that is part of the rest of the concrete5 framework) that I can pass this along to...but not have to pass the data in a non-secure way...?
You could also make it a concrete5 tool and use a redirect to map it to where you want it to be. A tool provides a minimal c5 environment.
A different way to use a tool is to add a bit of jQuery to your page or a 'wget' in the php response to the page, and use that to call a c5 tool with the mail. However, beware of leaving a security loophole if you try that.