473,414 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Solution needed

I am building a web site where people can register for a newsletter. when
they register they enter a email address into the database so we can send
the news letter to them.
Now what I want to do is for the owner of the site to be able to email a
HTML email to the server (win 2000 with exchange) and then forward the email
to all addresses in the database.

Can I get hold of the email though a data connection? Or can I add the
addresses to a group and then send from exchange?

any ideas?
Aug 21 '05 #1
6 1271
I'd suggest having a table with a field to store the body of the e-mail
and perhaps the date and perhaps an IsSent field or something.

And create a Web page for the owner of the site to enter the relevant
data for the e-mail and perhaps have a page to be able to view the
e-mail in HTML format and then of course have a Send button...

How do I send e-mail with CDO?
http://www.aspfaq.com/show.asp?id=2026

VBScript To Send Email Using CDO
http://www.paulsadowski.com/WSH/cdo.htm

How do I send e-mail from ASP?
http://www.aspfaq.com/show.asp?id=2119

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...

<<
I am building a web site where people can register for a newsletter.
when
they register they enter a email address into the database so we can
send
the news letter to them.
Now what I want to do is for the owner of the site to be able to email a
HTML email to the server (win 2000 with exchange) and then forward the
email
to all addresses in the database.

Can I get hold of the email though a data connection? Or can I add the
addresses to a group and then send from exchange?

*** Sent via Developersdex http://www.developersdex.com ***
Aug 22 '05 #2
i think you miss my pint,

the author of the newsletter, wants to compil the newsletter in word from a
remote location and email it to the others, so how do i get that email to go
to all on the database list

thanks
"Bullschmidt" <pa**@bullschmidt.com-nospam> wrote in message
news:ut**************@TK2MSFTNGP14.phx.gbl...
I'd suggest having a table with a field to store the body of the e-mail
and perhaps the date and perhaps an IsSent field or something.

And create a Web page for the owner of the site to enter the relevant
data for the e-mail and perhaps have a page to be able to view the
e-mail in HTML format and then of course have a Send button...

How do I send e-mail with CDO?
http://www.aspfaq.com/show.asp?id=2026

VBScript To Send Email Using CDO
http://www.paulsadowski.com/WSH/cdo.htm

How do I send e-mail from ASP?
http://www.aspfaq.com/show.asp?id=2119

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...

<<
I am building a web site where people can register for a newsletter.
when
they register they enter a email address into the database so we can
send
the news letter to them.
Now what I want to do is for the owner of the site to be able to email a
HTML email to the server (win 2000 with exchange) and then forward the
email
to all addresses in the database.

Can I get hold of the email though a data connection? Or can I add the
addresses to a group and then send from exchange?

*** Sent via Developersdex http://www.developersdex.com ***

Aug 22 '05 #3
Here's a snippet of code I've used for putting users' e-mail addresses
into a comma separated string.

' *** Build strUserEmails - E-mail addresses separated by comma and
space.
' Set sql.
strSQL = "SELECT UserEmail "
strSQL = strSQL & "FROM tblUser "
strSQL = strSQL & "WHERE (1=1) "
strSQL = strSQL & " AND ( "
' EquipUser level user shown in EquipEvent.EquipEventUserID if there
is one.
If EquipEventUserID <> "" Then
strSQL = strSQL & "( "
strSQL = strSQL & "(UserLevel=" & Chr(39) & "EquipUser" & Chr(39) &
") "
strSQL = strSQL & " AND (UserID=" & Chr(39) &
jpsvbFixSQL(EquipEventUserID) & Chr(39) & ") "
strSQL = strSQL & ") "
End If
' EquipAdmin level users.
strSQL = strSQL & " OR (UserLevel=" & Chr(39) & "EquipAdmin" &
Chr(39) & ") "
' Admin level users.
strSQL = strSQL & " OR (UserLevel=" & Chr(39) & "Admin" & Chr(39) &
") "
strSQL = strSQL & ") "
strSQL = strSQL & " AND (UserEmail Is Not Null) "
strSQL = strSQL & " AND (UserIsEmailNotif=True) "
strSQL = strSQL & "ORDER BY UserLName, UserFName "

' Open rs.
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open strSQL, objConn

' If no recs.
If objRS.EOF Then
' Close rs.
objRS.Close
Set objRS = Nothing

Exit Function
Else
' Put recs into array for speed.
arrayRS = objRS.GetRows

' Close rs.
objRS.Close
Set objRS = Nothing

' Init.
strUserEmails = ""

' Loop thru rows (i.e. recs).
For I = 0 To UBound(arrayRS, 2)
' Set var using each fld's col num.
UserEmail = jpsvbNullToBlank(arrayRS(0, I))
strUserEmails = strUserEmails & ", " & UserEmail
Next

' Remove initial comma and space.
strUserEmails = Right(strUserEmails, Len(strUserEmails) - 2)
End If

And here's a good reference for sending an e-mail attachment such as a
Word doc (although of course some users' computers might not allow a
Word doc to come through without special consideration since it could
contain macros:

Email (with Attachment)
http://www.asp101.com/samples/email_attach.asp

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...

<<
the author of the newsletter, wants to compil the newsletter in word
from a
remote location and email it to the others, so how do i get that email
to go
to all on the database list


*** Sent via Developersdex http://www.developersdex.com ***
Aug 22 '05 #4
You are still missing my point

I can handle the seding of emails,

What im am having a problem with is the trigger, the author of the newsleter
emailes his email to a exhcnage server, how do i then get that email to all
on the list? seeing that the list is not in exchange but in a SQL database?
"Bullschmidt" <pa**@bullschmidt.com-nospam> wrote in message
news:uu**************@TK2MSFTNGP10.phx.gbl...
Here's a snippet of code I've used for putting users' e-mail addresses
into a comma separated string.

' *** Build strUserEmails - E-mail addresses separated by comma and
space.
' Set sql.
strSQL = "SELECT UserEmail "
strSQL = strSQL & "FROM tblUser "
strSQL = strSQL & "WHERE (1=1) "
strSQL = strSQL & " AND ( "
' EquipUser level user shown in EquipEvent.EquipEventUserID if there
is one.
If EquipEventUserID <> "" Then
strSQL = strSQL & "( "
strSQL = strSQL & "(UserLevel=" & Chr(39) & "EquipUser" & Chr(39) &
") "
strSQL = strSQL & " AND (UserID=" & Chr(39) &
jpsvbFixSQL(EquipEventUserID) & Chr(39) & ") "
strSQL = strSQL & ") "
End If
' EquipAdmin level users.
strSQL = strSQL & " OR (UserLevel=" & Chr(39) & "EquipAdmin" &
Chr(39) & ") "
' Admin level users.
strSQL = strSQL & " OR (UserLevel=" & Chr(39) & "Admin" & Chr(39) &
") "
strSQL = strSQL & ") "
strSQL = strSQL & " AND (UserEmail Is Not Null) "
strSQL = strSQL & " AND (UserIsEmailNotif=True) "
strSQL = strSQL & "ORDER BY UserLName, UserFName "

' Open rs.
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open strSQL, objConn

' If no recs.
If objRS.EOF Then
' Close rs.
objRS.Close
Set objRS = Nothing

Exit Function
Else
' Put recs into array for speed.
arrayRS = objRS.GetRows

' Close rs.
objRS.Close
Set objRS = Nothing

' Init.
strUserEmails = ""

' Loop thru rows (i.e. recs).
For I = 0 To UBound(arrayRS, 2)
' Set var using each fld's col num.
UserEmail = jpsvbNullToBlank(arrayRS(0, I))
strUserEmails = strUserEmails & ", " & UserEmail
Next

' Remove initial comma and space.
strUserEmails = Right(strUserEmails, Len(strUserEmails) - 2)
End If

And here's a good reference for sending an e-mail attachment such as a
Word doc (although of course some users' computers might not allow a
Word doc to come through without special consideration since it could
contain macros:

Email (with Attachment)
http://www.asp101.com/samples/email_attach.asp

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...

<<
the author of the newsletter, wants to compil the newsletter in word
from a
remote location and email it to the others, so how do i get that email
to go
to all on the database list


*** Sent via Developersdex http://www.developersdex.com ***

Aug 23 '05 #5
On Sun, 21 Aug 2005 20:38:46 +0800, "Slim" <me@here.com> wrote:
I am building a web site where people can register for a newsletter. when
they register they enter a email address into the database so we can send
the news letter to them.
Now what I want to do is for the owner of the site to be able to email a
HTML email to the server (win 2000 with exchange) and then forward the email
to all addresses in the database.

Can I get hold of the email though a data connection? Or can I add the
addresses to a group and then send from exchange?

any ideas?


Look at any mailing list software.

Jeff
Aug 25 '05 #6
"Slim" <me@here.com> wrote in message
news:OG**************@TK2MSFTNGP14.phx.gbl...
I am building a web site where people can register for a newsletter. when
they register they enter a email address into the database so we can send
the news letter to them.
Now what I want to do is for the owner of the site to be able to email a
HTML email to the server (win 2000 with exchange) and then forward the
email
to all addresses in the database.

Can I get hold of the email though a data connection? Or can I add the
addresses to a group and then send from exchange?

any ideas?


1. You could access the message store via the IMessages interface in CDOEX,
find the message in question, retrieve the body of the message and then use
CDO to construct a new mail message using the retrieved body and a recipient
list generated from the address stored in your database.

Here's the link to the IMessages interface in CDOEX:
http://msdn.microsoft.com/library/en..._interface.asp

Here's the link to the CDO documentation:
http://msdn.microsoft.com/library/en...775976c12f.asp

2. You could use the OLE-DB Provider for Exchange to treat the message store
as a data source, then similar to option 1 you could retrieve the message
body and use CDO to construct a new message using the retrieved body and a
recipient list constructed from the addresses stored in your database.
Here's a link to an example of a connection string using the provider for
Exchange:

http://www.carlprothman.net/Default....derForExchange

3. Create a filter on the exchange account that receives the administrators
email and use the "start application" action to pass the message body to a
custom windows shell script that does the same thing as options 1 and 2,
namely use CDO to construct a new mail message using the passed in body and
a recipient list generated from the address stored in your database. Here's
a link to the Windows Scripting Host documentation:
http://msdn.microsoft.com/library/en...ScriptHost.asp

HTH
-Chris Hohmann
Aug 25 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jamie Meredith | last post by:
We are a small graphic design firm who is fighting a growth spurt which has resulted in an overload in our handling of email and proofing. We are looking for a pre-built, open source PHP/MYSQL...
1
by: BJS | last post by:
Sorry for the cross-posting, but based on the number of people I have seen ask for a solution to this problem, I hope by cross-posting this, that it will help a lot of people out of a common...
8
by: M O J O | last post by:
Hi, I'm creating an CRM solution for my company. I want to split up the solution into several classlibraries, so I dont need to build the entire solution every time I run my project. First...
20
by: msa | last post by:
Hi there, First off, let me say that I know that launching to full screen is a bad idea. I would never do it given the choice, but I must follow orders from my boss, the boss that desparately...
0
by: Andrew Dowding | last post by:
Hi Everybody, I have been looking at problems with my Windows Forms C# application and it's little Jet 4 (Access) database for the last few days. The Windows Forms app implements a facade and...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
3
by: Bruce W.1 | last post by:
I've been keeping my solution .sln files for ASP.NET projects off in some remote location, along with all my other .sln files. This confuses things and I think it really belongs with the web app...
10
by: JohnR | last post by:
I have a datatable as the datasource to a datagrid. The datagrid has a datagridtablestyle defined. I use the datagridtablestyle to change the order of the columns (so they can be different than...
3
by: Tigger | last post by:
I have an object which could be compared to a DataTable/List which I am trying to genericify. I've spent about a day so far in refactoring and in the process gone through some hoops and hit some...
12
by: contactmayankjain | last post by:
Hi, Its said that one should avoid dynamic allocation of memory, as it de- fragment the memory into small chunks and allocation of memory is a costly process in terms of efficiency. So what is...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.