Home All Groups Group Topic Archive Search About

Need Help Desparately

Author
31 Jan 2006 2:24 PM
rbutch@coair.com
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...

Author
31 Jan 2006 5:09 PM
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...

Show quote
"rik butcher" <rbu***@coair.com> escribió en el mensaje
news:OpkOcInJGHA.516@TK2MSFTNGP15.phx.gbl...
> 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...
Author
31 Jan 2006 8:04 PM
()
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...
Author
1 Feb 2006 4:57 PM
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.



Show quote
escribió en el mensaje news:u706CGqJGHA.2088@TK2MSFTNGP11.phx.gbl...
> 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...

AddThis Social Bookmark Button