473,402 Members | 2,053 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,402 software developers and data experts.

emailing newsletter from XML recipient list

Thanks in advance for for any clues: I have a website I'm building
using MS-Visual Web Developer Express (Asp.Net/VB.net). I'm tooling
it
to collect names and emails to send out our newsletter. I have
successfully setup an XML file with some sample names and emails. I
populated this through a well functioning .aspx page that writes to
the XML file and I have set up another .aspx page from which I can
view the collected persons. what I need is a way to send our
newsletter (which for the time being will be just some text in the
email body (but I'd like to do more). So I need to parse through the
XML list and send an email to each recipient. Any clues?

Here's my code for users entering their names and email addresses:
<script runat="server">
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
Using ds As New DataSet()
ds.ReadXml(Server.MapPath("emailList.xml"))
txtNewEvent.DataBind()
txtDate.DataBind()
End Using
End If
End Sub
Private Sub btnSubmit_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnSubmit.Click
Using ds As New DataSet()
ds.ReadXml(Server.MapPath("emailList.xml"))
Dim dr As DataRow = ds.Tables(0).NewRow()
dr("emailAddress") = txtNewEvent.Text
dr("name") = txtDate.Text
ds.Tables(0).Rows.Add(dr)
ds.WriteXml(Server.MapPath("emailList.xml"))
End Using
End Sub
</script>
Here's my code for viewing the list of emails:
<script runat="server">
Private Function MakeDataView() as DataView
Dim myDataSet As New DataSet()
myDataSet.ReadXml(Server.MapPath("emailList.xml"))
Dim view As DataView = New DataView(myDataSet.Tables(0))
view.AllowDelete = False
view.AllowEdit = False
view.AllowNew = False
view.Sort = "Name ASC"
Return view
End Function
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim view as DataView = MakeDataView()
dgEmail.DataSource = view
dgEmail.AllowSorting = True
dgEmail.DataBind()
End Sub
</script>
Thanks!!!

Feb 14 '08 #1
2 1362
hmm...you can use SQL Server to retrieve data from XML file and send
emails...
Feb 14 '08 #2
Ooops... my web hosting provider does not support SQLServer and I've
had a dickens of a time installing it and finding workarounds. I have
an Access database running on my site... can that be used to retrieve
XML data? I'm a newbie to sending out bulk emails through VB.net/
ASP.net so I don't know where to start.

I did find this block of code that I may be able to learn something:

<%@ Page Explicit="True" Language="VB" Debug="True" %>
<html>
<body>
<%
Dim EMailFrom As String = "bi**@edgequest.com"
Dim EMailTo As String = "bi**********@edgequest.com"
Dim EMailSubject As String = "Important message!"
Dim EMailBody As String = "Thanks for reading this" & _
"message but I must admit, I lied. There's " & _
"nothing important about this message at all."

Dim MySmtpClient As New _
System.Net.Mail.SmtpClient("localhost")

MySmtpClient.Send(EMailFrom, EMailTo, _
EMailSubject, EMailBody)
%>
</body>
</html>

On Feb 14, 8:31*am, siccolo <aleks...@hotmail.comwrote:
hmm...you can use SQL Server to retrieve data from XML file and send
emails...
Feb 14 '08 #3

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

Similar topics

2
by: Paul Hudson | last post by:
Ive developed a web based system where somebody can add a news record using ASP and MS Access database connectivity. The new record is inserted into the database and then a formatted email gets...
0
by: Steven Scaife | last post by:
There seems to be a problem with my emailing code, although during testing it worked fine. What happens is it sends two emails instead of one, and also doesn't put any text in the email for some...
2
by: Chuck | last post by:
I have a database that has a table in it with employee information (name, dob, email, etc). This is joined to a table that has tasks that are assigned to each individual that has a recurring date....
3
by: Strasser | last post by:
In Access2000 mass emailing worked perfectly (very powerful tool!). Doesn't work when using XP version of both Access and Outlook, even though I checked the box to ensure that I was sending the...
4
by: Daniele Baroncelli | last post by:
I wrote a post few days ago, but I didn't get replies. I am looking for a PHP open source application to compose and send newsletters. Can anyone suggest me one? Daniele
11
by: ginoplusio | last post by:
Hi, I'm developing a software to send newsletter to the users of my website. I have a problem on the stats, detecting the opening of the newsletter on the user's client. The method I've chosen...
0
by: slinky | last post by:
Thanks in advance for for any clues: I have a website I'm building using MS-Visual Web Developer Express (Asp.Net/VB.net). I'm tooling it to collect names and emails to send out our newsletter. I...
1
by: slinky | last post by:
Thanks in advance for for any clues: I have a website I'm building using MS-Visual Web Developer Express Asp.Net/VB.net). I'm tooling it to collect names and emails to send out our newsletter. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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:
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...

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.