Need Help Desparately

R

rbutch

hey guys, i'm in need of some serious help here.
i've got a project with little time to research and barely enough time to code.
i know this may sound simple to you guys, and that's great.
all help is appreciate and i'm picking up lunch for this.
the .exe will run as a service and seach a database every 60 seconds for records based on a condtion.
if condition exists, fetch the records and send an email.

i need to retrieve these records from a database as a dataset or datatable and then put those records in the Body of an email.
i have to display them in table form + insert a logo as well. and im thinking i need to use something like.
oMailMsg.BodyFormat = MailFormat.Html
i've had no success embedding the .jpg in the email when i dont use MailFormat.Html.
my Problem is handling the data retrieved - since it will be a collection and needs to fit neatly in a table w/ borders format.
thanks for any help
rik
Can Anyone help or direct me to a solution that can do this?

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
H

Hans Baumann

If you want a rapid solution, you can use some third-party component to
generate html email with embedded images, we use aspNetMail for example and
it isn't expensive...
 
G

Guest

Actually, i was able to figure this out on my own Using StringBuilder.
Dim sb As New StringBuilder
oMailMsg.BodyFormat = MailFormat.Html

sb.Append("<p><img SRC=C:\SelectLogo.gif></p><br>")
For Each aRow In ds.Tables(0).Rows
sb.Append("<table border=1><tr><td>" + aRow.Item(0) + "</td>" + "<td>" + aRow.Item(1) + "</td></tr></table>")
Next
oMailMsg.Body = sb.ToString
'Send the message
If Not (oMailMsg.To = String.Empty) Then
SmtpMail.Send(oMailMsg)
End If

so, i was able to get everything from a dataset or datatable + an .jpg that was stored on the C:\ drive

thanks
rik

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
H

Hans Baumann

yes, but I guess that Rik tries to embedd the image into the email so it can
be sent to another place where that image can't be reached, even from a
public url.



escribió en el mensaje news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

DataRow Iteration 2
vb.net emails,mailMsg.To format string 1
e.Item.Cells(3).Text help 1
Get the last record in a dataset 3
vb.net 1
vb.net 1
assembly protection ? 3
Send a DataTable to Oracle DataBase 1

Top