WebsiteBaker 2.13.9 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
$bccquery ="";//initialize the to field for email$toinitial ="sendto@email.com";//connect to database (this used for MS Access Database$conn = new COM('ADODB.Connection') or die('Could not make conn');$rs = new COM('ADODB.Recordset') or die('Coult not make rs');$connstring = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=mydb.mdb";$conn->Open($connstring);//Connect to WebsiteBaker db//My best guess at websitbaker query//$query = "SELECT email FROM ".TABLE_PREFIX."users WHERE group_id <> 0";//$result = $database->query($query);// Select your email addresses in a search$sql = "SELECT [E-MAIL], ClassCode FROM tblMembership Where ClassCode IN (1, 2, 3,4,5) AND [E-Mail] <> '' ";//More access db$rs->Open($sql, $conn, 1, 3);while(!$rs->EOF) {//$bccquery = $bccquery .$rs->Fields['E-Mail']->Value . "," ; $rs->MoveNext();}//Close access database$rs->Close();$conn->Close();$rs=null;$conn=null;// now lets send the email.//retrieves data from form$to = $_POST['toemail']; //Retrieves Subject of Email from Form$subject = $_POST['subject']; //$email = $_POST['email'] ;//change this to your email. $to = $_POST['toemail']; $from = 'mdemaree99@yahoo.com' ;//begin of HTML message$message = $_POST['message'] ;$message = stripslashes($message); //change this to JLA email. $to = $_POST['toemail'] ; //Sets who email is from $from = "mdemaree99@yahoo.com"; //Header field for email (need from to detrmine header) $headers = "From: $from\r\n"; $headers .= "Content-type: text/html\r\n"; //options to send to cc $ccemail = $_POST['ccemail'] ; if ($ccemail<>'') { $headers .= "Cc: $ccemail\r\n"; } //options to send bcc $bccemail = $_POST['bccemail'] ; if ($bccemail<>'') {$headers .= "Bcc: $bccemail\r\n"; }if (!isset($_POST['submit'])) { // if page is not submitted to itself echo the form// FORM to input data for email//Predefines fields for the form $toemail = 'mdemaree99@yahoo.com'; $ccemail = ''; $bccemail = $bccquery;echo (" <form method='post' action=$PHP_SELF> ");echo ("<table>");//TOecho (" <tr><td valign='top'>TO:</td>");echo (" <td><textarea name='toemail' type='text' rows='1' cols='50'>$toemail</textarea></td></tr>");//CCecho (" <tr><td valign='top'>CC:</td>");echo ("<td> <textarea name='ccemail' type='text' rows='1' cols='50'>$ccemail</textarea></td></tr>");//BCCecho (" <tr><td valign='top'> BCC: </td> ");echo ("<td> <textarea name='bccemail' type='text' rows='4' cols='50' />$bccemail</textarea></td></tr>");//SUBJECTecho (" <tr><td valign='top'> SUBJECT: </td> ");echo (" <td> <textarea name='subject' type='text' rows='1' cols='50' /></textarea></td></tr> ");//BODY OF EMAILECHO (" <TR><td>Body:</td><TD> ");ECHO (' <input type="hidden" name="bd937a97e1a1514d" value="e1a1514d74ca5783" title="" alt="" /> ');//Must modify to your website --see note belowECHO (' <input type="hidden" id="message" name="message" value="" style="display:none"/><input type="hidden" id="message___Config" value="CustomConfigurationsPath=http://www.jlarlington.org/jlabaker/modules/fckeditor/wb_config/wb_fckconfig.js&EditorAreaCSS=http://www.jlarlington.org/jlabaker/modules/fckeditor/wb_config/wb_fckeditorarea.css&StylesXmlPath=http://www.jlarlington.org/jlabaker/modules/fckeditor/wb_config/wb_fckstyles.xml&TemplatesXmlPath=http://www.jlarlington.org/jlabaker/modules/fckeditor/wb_config/wb_fcktemplates.xml&LinkBrowserURL=http://www.jlarlington.org/jlabaker/modules/fckeditor/fckeditor/editor/filemanager/browser/default/browser.html?Connector%3Dhttp://www.jlarlington.org/jlabaker/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/connector.php&ImageBrowserURL=http://www.jlarlington.org/jlabaker/modules/fckeditor/fckeditor/editor/filemanager/browser/default/browser.html?Connector%3Dhttp://www.jlarlington.org/jlabaker/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/connector.php&FlashBrowserURL=http://www.jlarlington.org/jlabaker/modules/fckeditor/fckeditor/editor/filemanager/browser/default/browser.html?Connector%3Dhttp://www.jlarlington.org/jlabaker/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/connector.php" style="display:none" /><iframe id="message___Frame" src="http://www.jlarlington.org/jlabaker/modules/fckeditor/fckeditor/editor/fckeditor.html?InstanceName=message&Toolbar=WBToolbar" width="100%" height="350" frameborder="0" scrolling="no"></iframe> ');ECHO (" </TD></TR> ");//Must modify to your website// Create a page in WebsiteBaker with WYSIWYG section// right click to view source and copy FCKEditor settings.// replace all content64 with item you are pulling from post (previous is message)//ECHO (' <input type="hidden" name="bd937a97e1a1514d" value="e1a1514d74ca5783" title="" alt="" /> ');//ECHO (' <input type="hidden" id="content64" name="content64" value="" style="display:none" /><input type="hidden" id="content64___Config" value="CustomConfigurationsPath=http://www.jlarlington.org/jlabaker/modules/fckeditor/wb_config/wb_fckconfig.js&EditorAreaCSS=http://www.jlarlington.org/jlabaker/modules/fckeditor/wb_config/wb_fckeditorarea.css&StylesXmlPath=http://www.jlarlington.org/jlabaker/modules/fckeditor/wb_config/wb_fckstyles.xml&TemplatesXmlPath=http://www.jlarlington.org/jlabaker/modules/fckeditor/wb_config/wb_fcktemplates.xml&LinkBrowserURL=http://www.jlarlington.org/jlabaker/modules/fckeditor/fckeditor/editor/filemanager/browser/default/browser.html?Connector%3Dhttp://www.jlarlington.org/jlabaker/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/connector.php&ImageBrowserURL=http://www.jlarlington.org/jlabaker/modules/fckeditor/fckeditor/editor/filemanager/browser/default/browser.html?Connector%3Dhttp://www.jlarlington.org/jlabaker/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/connector.php&FlashBrowserURL=http://www.jlarlington.org/jlabaker/modules/fckeditor/fckeditor/editor/filemanager/browser/default/browser.html?Connector%3Dhttp://www.jlarlington.org/jlabaker/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/connector.php" style="display:none" /><iframe id="content64___Frame" src="http://www.jlarlington.org/jlabaker/modules/fckeditor/fckeditor/editor/fckeditor.html?InstanceName=content64&Toolbar=WBToolbar" width="100%" height="350" frameborder="0" scrolling="no"></iframe> '); echo (" <tr><td colspan='2' style='text-align: center;'> <input type='submit' value='Send Email' name='submit'></td></tr> ");echo (" </table> "); echo (" </form>");//Send email once email is complete and Send Email clicked} else { // now lets send the email. if (mail($to, $subject, $message, $headers)) { //this will give user a view on what email will look like echo "Message has been sent....!"; echo "Message has been sent....!<br><br>"; echo ("From: $from <br> "); echo ("TO: $to <br> "); echo ("CC: $ccemail <br>"); echo ("BCC: $bccemail <br>"); echo ("Subject: $subject <br><BR>"); echo ("Body: <br> $message "); } else { echo 'There was a problem sending the email.'; } }