CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Send multiple e-mails???

Print topic Send  topic

Author Message
news-server
Posted: 07/25/2001, 4:29 PM

Hey, awhile back somebody posted some code here to send e-mail to everyone
in a list / database... Using "custom show" event, I believe. I cannot find
it to save my life... Could somebody re-post it?

Thanks!

Robert

Ken Hardwick
Posted: 07/25/2001, 7:31 PM

Is this the message you were looking for........


Correction, one of my comments below is wrong and should be removed:
"'Select only those that match selected member status, or all if the
status is = 0"



"CodeCharge" <support@codecharge.com> wrote in message
news:9iktag$iln$1@news.codecharge.com...
> I wrote this ASP code recently, which you can place in Modules/Global
> Functions section of CC:
>
> 'Send Emails based on SQL query
> sub sendemails(email_sql, email_from, email_subject, email_body)
> openrs email_rs, email_sql
> while not email_rs.EOF
> Set objCDO = Server.CreateObject("CDONTS.NewMail")
> objCDO.From = email_from
> objCDO.To = GetValue(email_rs, 0)
> objCDO.Subject = email_subject
> objCDO.Body = email_body
> objCDO.MailFormat = 0
> objCDO.Send
> set objCDO=Nothing
> email_rs.MoveNext
> wend
> end sub
>
> Then I have a page that allows an adminstrator to enter an email message,
> which gets recorded in the database, but in the "After Insert" Event I
call
> the above function with this code that sends emails to everyone:
> 'Send emails
> 'Select only those that match selected member status, or all if the status
> is = 0
> call sendemails("SELECT email FROM members WHERE email <> """"",
> fldemail_from, fldemail_subject, fldemail_body)
>
> My form contains fields: email_from, email_subject, email_body among
others.
>
> BTW, we plan to describe the above method in future CC documentation, as
it
> is an option for everyone to create CodeCharge components (by placing
> functions in the Modules section).
>
> Adam S.
> YS/CC
>
>
> "news-server" <you@me.com> wrote in message
>news:9ikr2e$dvl$1@news.codecharge.com...
> > Any tips on how I might use CodeCharge to send an e-mail to everyone in
a
> > database? Where do I put the code to send the e-mail?
> >
> > Rjb
> >
> >
>
>


"news-server" <you@me.com> wrote in message
news:9jnkpi$oho$1@news.codecharge.com...
> Hey, awhile back somebody posted some code here to send e-mail to everyone
> in a list / database... Using "custom show" event, I believe. I cannot
find
> it to save my life... Could somebody re-post it?
>
> Thanks!
>
> Robert
>
>

news-server
Posted: 07/26/2001, 9:19 AM

Ken, not sure if this is the exact one, but this looks good! Thanks very
much...

There are still a lot of features about CodeCharge I don't quite get. This
should help me grasp a little more.

To simplify your code, I think I'll just create a query in Access that pulls
valid addresses so no SQL statement is required.

After the e-mail is sent, where do you return the app user? I was thinking
of a grid form that would display the history of sent e-mail's... BTW, I
will be using ASP Q Mail to do this. The advantage is you can que up the
e-mails so the routine will execute very quickly...

Thanks again!

Robert

"Ken Hardwick" <kenhardwick@visto.com> wrote in message
news:9jnvdq$cli$1@news.codecharge.com...
> Is this the message you were looking for........
>
>
> Correction, one of my comments below is wrong and should be removed:
> "'Select only those that match selected member status, or all if the
> status is = 0"
>
>
>
> "CodeCharge" <support@codecharge.com> wrote in message
>news:9iktag$iln$1@news.codecharge.com...
> > I wrote this ASP code recently, which you can place in Modules/Global
> > Functions section of CC:
> >
> > 'Send Emails based on SQL query
> > sub sendemails(email_sql, email_from, email_subject, email_body)
> > openrs email_rs, email_sql
> > while not email_rs.EOF
> > Set objCDO = Server.CreateObject("CDONTS.NewMail")
> > objCDO.From = email_from
> > objCDO.To = GetValue(email_rs, 0)
> > objCDO.Subject = email_subject
> > objCDO.Body = email_body
> > objCDO.MailFormat = 0
> > objCDO.Send
> > set objCDO=Nothing
> > email_rs.MoveNext
> > wend
> > end sub
> >
> > Then I have a page that allows an adminstrator to enter an email
message,
> > which gets recorded in the database, but in the "After Insert" Event I
> call
> > the above function with this code that sends emails to everyone:
> > 'Send emails
> > 'Select only those that match selected member status, or all if the
status
> > is = 0
> > call sendemails("SELECT email FROM members WHERE email <> """"",
> > fldemail_from, fldemail_subject, fldemail_body)
> >
> > My form contains fields: email_from, email_subject, email_body among
> others.
> >
> > BTW, we plan to describe the above method in future CC documentation, as
> it
> > is an option for everyone to create CodeCharge components (by placing
> > functions in the Modules section).
> >
> > Adam S.
> > YS/CC
> >
> >
> > "news-server" <you@me.com> wrote in message
> >news:9ikr2e$dvl$1@news.codecharge.com...
> > > Any tips on how I might use CodeCharge to send an e-mail to everyone
in
> a
> > > database? Where do I put the code to send the e-mail?
> > >
> > > Rjb
> > >
> > >
> >
> >
>
>
> "news-server" <you@me.com> wrote in message
>news:9jnkpi$oho$1@news.codecharge.com...
> > Hey, awhile back somebody posted some code here to send e-mail to
everyone
> > in a list / database... Using "custom show" event, I believe. I cannot
> find
> > it to save my life... Could somebody re-post it?
> >
> > Thanks!
> >
> > Robert
> >
> >
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.