wayne Posted January 16, 2006 Share Posted January 16, 2006 Using PHP/mySQL Have a database of registrants and one field is their email address.Want to allow event director to log in to a secure area, fill out a form with the message and be able to send the message to all the registrants to his event. I created a form with 2 fields. From address (this will be the event director's address) and a text field for the content of the email. These are sent to the variables $eventdirectoremail and $body. 2 issues: 1. paragraphs are not kept, when the confirmation page comes up all text just runs together. 2. I want to use the following general format. I can get the data from the database no problem into the variable $emailaddressesfromdatabase. The $eventdirectoremail and $body are grabbed from the form. $headers = "From: $eventdirectoremail\r\n"; $headers .= "Reply-To: $eventdirectoremail\r\n"; // $headers .= "To: $eventdirectoremail\r\n"; $headers .= "bcc: "$emailaddressesfromdatabase"\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "X-Priority: 1\r\n"; $headers .= "X-MSMail-Priority: High"; $mail_subject = "Subject is here"; $mail_body = "$body\n"; mail("$email", $mail_subject, $mail_body, $headers, "-f".$eventdirectoremail); not being sent, any ideas? Quote Link to comment Share on other sites More sharing options...
stevevan Posted January 16, 2006 Share Posted January 16, 2006 Sorry I don't have an answer for you Wayne, but hold on...one of our scripting guru's should be along to help you out. Quote Link to comment Share on other sites More sharing options...
ashesnglass Posted January 25, 2006 Share Posted January 25, 2006 Re: the problem with the lines running together, make sure there's a nl2br($body) in there somewhere. As for e-mails not sending, I'm having the same problem. Whether I set e-mails to be sent to each DB address separately or add them all as Bcc's, some addresses get the e-mails and most don't. Quote Link to comment Share on other sites More sharing options...
TCH-Andy Posted January 25, 2006 Share Posted January 25, 2006 How many emails are you trying to send in one go? There are restrictions on the server (to stop spammers), if you open a ticket at the help desk, we can go into details. Quote Link to comment Share on other sites More sharing options...
wayne Posted January 25, 2006 Author Share Posted January 25, 2006 I have looked further into this and found out that DADA mail is ideal for me. I have installed it and set it to use a mysql backend for the email addresses. A little tweaking of the conifg.pm file to remove some options on the list page and I can let my event directors log in and send an event update to registrants without fear of them editing the list properties. --- settings removed --- Thanks for your suggestions. Wayne Edit: TCH-Bruce - settings removed to prevent spammers from catching on Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted January 25, 2006 Share Posted January 25, 2006 We send people to the help desk for a reason to get the settings for setting up your mailing lists. Please do not post that information in these forums. Thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.