viktor
|
| Posted: 09/30/2005, 10:51 AM |
|
hello everybody:
I still try to implement what has been written here http://forums.codecharge.com/posts.php?post_id=61979
so far it proofs that CCS is not very good for it.
problem 1
=============
How can I send emails to more then 10 people in the database without playing with all these BCC. I don't think it is prudent. Also I think it is nice to send an email to person with his / her name on "TO" field rather then to put all people into BCC...
problem
==========
My UNIX server resulted with the following error:
=== start of error ===
Below are the recently upload scripts that contain code to send email. You may wish to inspect them to ensure they are not sending out SPAM.
/usr/home/managecv/public_html/admin/mail/mail.php:439: // Events
/usr/home/managecv/public_html/admin/mail/mail.php:440: include("./mail_events.php");
/usr/home/managecv/public_html/admin/mail/mail.php:441: BindEvents();
=== end of error ===
any ideas?
maybe new version has addressed this issue?
regards,
Viktor
|
|
|
 |
Benjamin Krajmalnik
|
| Posted: 09/30/2005, 4:46 PM |
|
Well, Viktor, you cannot blame CCS for this. CCS uses the built-in PHP mail
functionality. You can send to multiple recipiemnts without any problem - I
do it all the time. You just need to build the "To" properly in accordance
to the SMTP RFC.
You can store the various e-mail addresses in an array and loop through it
to send individual messages. You just need to study look at the code which
CodeCharge generated and modify it accordingly.
Additionally, once you get beyond this, there is another layer - the actual
SMTP server processing the mail. It may be set to not accept more than x
recipients per message. Many mail servers are configured in this manner as
one of the ways to prevent some SPAM.
|
|
|
 |
viktor
|
| Posted: 10/04/2005, 8:07 AM |
|
I don't blame, I simply am struglling to put togather an application and wasted already more time for email bit rather then the rest of the application. In this sense CCS is far beyound any other similar product.
But still mailing out to more then 10 people is quite important to the MOST of currenlty built application...
How do I write loop procedure? Is ther any sample in CCS?
Thanks in advance,
Viktor
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 10/04/2005, 1:14 PM |
|
victor,
CCS is not supposed to be "good at it". CCS is used for creating Web interfaces, not associated tasks or background processes like sending multiple emails. For this you'd use standard PHP code, outside of CCS or within CCS events.
We provide various PHP examples in the documentation to make things easier but you can find many more examples of anything imaginable on the Internet, in PHP documentation and various PHP tutorials. In your case you probably don't even need a CCS Web page to send those emails, but instead you can redirect users to another PHP program that sends emails. You can find many such programs and examples at: http://www.google.com/search?hl=en&lr=&q=sending+multiple+emails+php http://www.google.com/search?hl=en&lr=&q=php+emailer http://www.google.com/search?hl=en&lr=&q=php+mailer
If you want to do a PHP loop then here is an example that would work with a CCS connection:
$db = new clsDBInternetDB();
$SQL = "SELECT something FROM somewhere";
$db->query($SQL);
while ($db->next_record()) {
echo "do something here like sending an email";
}
$db->close();
I extracted the above code from the Bookstore example.
There is also an example of obtaining multiple database fields from a single record at http://docs.codecharge.com/studio/html/ProgrammingTechn...leDBValues.html , which you can combine with the above loop to read multiple database records.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
|