|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
email list mailing from DB
I have a (mysql)database and a table for email adresses where I have a collumn id (unique id for the email) and email. what I´d like to do is to send an email to all my adresses when a change in your ltw calendar is made. is there a possibility to send to all my recipients at once or do I have to make a for loop which increases the id by one, sends an email to the adress, increases the id by 1 ... with a lot of adresses it would take long.
so, is there a possibility to send a message to the column "email"? would be great if could post the code how to implement this in your calendar ... (2)another question: is it possible to convert the months in the calendar into another language (eg german)? thx in advance |
|
#2
|
|||
|
|||
|
RE: email list mailing from DB
after the lines in the ltw_classes.php file that read :
$query = "INSERT $this->calendar_table VALUES('', '" . strip_tags($row = $this->db->db_fetch_array($result) . "', '" . $date . "', '" . $start_time . ":00', '" . $end_time . ":00', '" . strip_tags($description) . "', " . $recurring . ", " . $dayofweek . ")"; $this->db->db_query($query); do something like this: $query = "SELECT email FROM youremailtable"; $result = $this->db->db_query($query); $row = $this->db->db_fetch_array($result); $emails = $row['email']; while($row = $this->db->db_fetch_array($result)) { $emails =. "," . $row['email']; } $message = "There is a new event called '$name' that was added for the date of $date. Check it out!"; mail($emails,"New Event in Calendar",$message,"From: events@yourdomain.comrn"); note: I haven't tested this, but it (or something very similar) should work... The other language thing is another story...I'll get back to you on that one... |
|
#3
|
|||
|
|||
|
RE: email list mailing from DB
hmm, it does not parse. and I cant find the problem. and when I send an email, shouldn´t there be something like $content = fread(fopen($file,"r"),filesize($file));
$content = chunk_split(base64_encode($content)); $uid = strtoupper(md5(uniqid(time()))); $name = basename($file); $header = "From: $fromnReply-To: $fromn"; $header .= "MIME-Version: 1.0n"; $header .= "Content-Type: multipart/mixed; boundary=$uidn"; $header .= "--$uidn"; $header .= "Content-Type: text/plainn"; $header .= "Content-Transfer-Encoding: 8bitnn"; $header .= "$textn"; $header .= "--$uidn"; $header .= "Content-Type: $type; name="$name"n"; $header .= "Content-Transfer-Encoding: base64n"; $header .= "Content-Disposition: attachment; filename="$name"nn"; $header .= "$contentn"; or so? dunno, the code looks ok to me but it does not parse. thx btw for your help |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > email list mailing from DB |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|