Sending bulk e-mails... |
3/24/2007 6:32:35 AM |
PHPRunner General questions | |
M
mmponline author
With the great help of support, we developed a script to send e-mails to registered users of certain info added to a table (Eg. adding a new topic)
function BeforeAdd(&$values)
|
|
D
|
Dale 3/24/2007 |
Im no expert but your code seems fine upto and including the line below.
|
M
|
mmponline author 3/30/2007 |
DaleM function BeforeEdit(&$values, $where) |
M
|
Martijn 3/30/2007 |
DaleM Sorry for my late reply. I've been out for a few days. I've reduced the code to the following without getting error messages, but the mails are not sent. When saving the record change, it takes quite a while, and then goes back to my list page. No messages are sent, however. Can you (or anybody) please assist. I need to get this working!!! function BeforeEdit(&$values, $where)
|
D
|
Dale 3/30/2007 |
Stephan, I think you need to move the email snippet outside your while loop. |
M
|
mmponline author 3/31/2007 |
DaleM $strSQL = "select Email from Login where Available='Sure'";
|
D
|
Dale 3/31/2007 |
I believe you have some variables that were calling for values from the database. Looking at your snippet I may have been wrong in the point about the $headers and $message. I was assuming the TO and FROM were related to email addresses and not dates. |
M
|
mmponline author 4/2/2007 |
DaleM function BeforeEdit(&$values, $where)
|
D
|
Dale 4/2/2007 |
We need a loop around the mail command to mail to each email address you have accumulated. |
M
|
mmponline author 4/2/2007 |
We're getting there - Good news and bad. $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
|
D
|
Dale 4/2/2007 |
Glad to see its advancing a bit. All trial and error on my side for sure. |
![]() |
Admin 4/4/2007 |
I think this is the time for me to jump in. |
D
|
Dale 4/4/2007 |
I agree with the Admin comment completely. |