Sending Emails To Entries In My Database

windows

Guest
Using PHP/mySQL<br /><br />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.<br /><br />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.<br /><br />2 issues:<br /><br />1. paragraphs are not kept, when the confirmation page comes up all text just runs together.<br />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.<br /><br /><br />$headers = "From: $eventdirectoremail\r\n";<br />$headers .= "Reply-To: $eventdirectoremail\r\n";<br />//$headers .= "To: $eventdirectoremail\r\n";<br />$headers .= "bcc: "$emailaddressesfromdatabase"\r\n";<br />$headers .= "MIME-Version: 1.0\r\n";<br />$headers .= "X-Priority: 1\r\n";<br />$headers .= "X-MSMail-Priority: High";<br /><br />$mail_subject = "Subject is here";<br /><br />$mail_body = "$body\n";<br />mail("$email", $mail_subject, $mail_body, $headers, "-f".$eventdirectoremail);<br /><br />not being sent, any ideas?<!--content-->
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.<!--content-->
Re: the problem with the lines running together, make sure there's a nl2br($body) in there somewhere.<br /><br />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.<!--content-->
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.<!--content-->
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.<br /><br /><!--sizeo:1--><span style="font-size:8pt;line-height:100%"><!--/sizeo--><!--coloro:#3366FF--><span style="color:#3366FF"><!--/coloro-->--- settings removed ---<!--colorc--></span><!--/colorc--><!--sizec--></span><!--/sizec--><br /><br />Thanks for your suggestions.<br /><br />Wayne<br /><br /><br /><!--sizeo:1--><span style="font-size:8pt;line-height:100%"><!--/sizeo--><!--coloro:#3366FF--><span style="color:#3366FF"><!--/coloro-->Edit: TCH-Bruce - settings removed to prevent spammers from catching on<!--colorc--></span><!--/colorc--><!--sizec--></span><!--/sizec--><!--content-->
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.<br /><br />Thank you!<!--content-->
 
Back
Top