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

  • SEARCH
  • Home
  • 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 7825459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:59:25+00:00 2026-06-02T08:59:25+00:00

I can use this code to send an email on my Exchange server Try

  • 0

I can use this code to send an email on my Exchange server

Try
        Dim SmtpServer As New SmtpClient
        Dim mail As New MailMessage
        SmtpServer.Credentials = New Net.NetworkCredential()
        SmtpServer.Port = 25
        SmtpServer.Host = "email.host.com"
        mail = New MailMessage
        mail.From = New MailAddress("myemail@email.com")
        mail.To.Add("otheremail@email.com")
        mail.Subject = "Equipment Request"
        mail.Body = "This is for testing SMTP mail from me" 


        SmtpServer.Send(mail)

    catch ex As Exception
        MsgBox(ex.ToString)
    End Try

But how can I add multiple lines to the body?

  • 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-02T08:59:28+00:00Added an answer on June 2, 2026 at 8:59 am

    Just treat it like a normal text object where you can use Environment.NewLine or vbNewLine between sentences.

    StringBuilder is useful here:

    Dim sb As New StringBuilder
    sb.AppendLine("Line One")
    sb.AppendLine("Line Two")
    
    mail.Body = sb.ToString()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to send an email from c# code via our company's exchange server.
I use this code to update data in database table. Can reuse same code
how exactly I can use public methods (non-virtual) with NHibernate? I have this code:
I can't figure out the use for this code . Of what use is
In SQL Server I can use this: DECLARE @PageNum AS INT; DECLARE @PageSize AS
In SQL Server 2017, you can use this syntax, but not in earlier versions:
I just tried to send email using this code and it seems to work:
How can I use Django's template tags within JavaScript? This is my code: {%
I am using this code to send an SMTP email via the yahoo SMTP
Right now I can use this URL to request a Google Static Maps image

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.