Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8245081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:04:09+00:00 2026-06-07T22:04:09+00:00

I have a program that on load will load the dataset with info from

  • 0

I have a program that on load will load the dataset with info from a query. I then send the information in an email. Everything is working correctly except the output. The output is wrapped and not in table format. If I debug the program and paste the “Value” of “Payouts” into a txt document and save it as an html file it is formatted correctly (Shows in table form). Here is my Code:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


        Try
            Dim SmtpServer As New SmtpClient()
            Dim mail As New MailMessage()
            Me.Paid_Out_TbTableAdapter.Fill(Me.DataDeliveryServiceDataSet.Paid_Out_Tb)
            Dim payouts = _
            <html>
                <body>
                    <table>
                        <tr><th>My First Column Header</th><th>My Second Column Header</th></tr>
                        <%= From paidOut In Me.DataDeliveryServiceDataSet.Paid_Out_Tb.AsEnumerable _
                            Select <tr><td><%= paidOut.Store_Id %></td><td><%= paidOut.Paid_Out_Comment %></td></tr> %>
                    </table>

                </body>
            </html>

            SmtpServer.Credentials = New  _
            Net.NetworkCredential("****", "****")
            SmtpServer.Port = 25
            SmtpServer.Host = "*****"
            mail = New MailMessage()
            mail.From = New MailAddress("*@*.com")
            mail.To.Add("*@*.com")
            mail.Subject = "Test Mail"
            mail.IsBodyHtml = True
            mail.Body = payouts
            SmtpServer.Send(mail)
            MsgBox("mail send")
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
End Sub

Here what is sent in an email as the body:

My First Column HeaderMy Second Column Header4567OFFICE SUPPLIES4567REIMBUSEMENT FOR SERVICE PER ROB PER INCIDENT REPORT4567REFUND FOR SERVICE INVOICE# **4567OFFICE SUPPLIES AND GATORADE

As you can see it’s just wrapped and not formatted… How can I get the body to be either in TXT format as a table, or in HTML Format as a table.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T22:04:10+00:00Added an answer on June 7, 2026 at 10:04 pm

    The CStr(XElement) function just returns the content of the element. Use:

    mail.body=payouts.ToString()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a program that will load an image from the hard disk. The
I have a program that's resident in flash and will run from flash. Early
I have to build a program that will allow me to track from a
I have a program, that takes a long time to load. Because of this,
I have a program that gets a JSON from the server using getJSON and
I have a program that saves an image in a local directory and then
I have a program that reads from a file that grabs 4 bytes from
Here's the deal. I've got a program that will load a given assembly, parse
working on making a flash program that loads about 1000 jpegs and then plays
I have a WPF program with two listviews which display information from two different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.