Avatar of KMBrochu
KMBrochu asked on

How to change font with stringbuilder in VB.NET

Hello.  I have simple text that is being sent to clients via smtp email.   I need to format the text so that the columns line up correctly.  To do this, I think I need to use a font such at Helvetica.  How can I do this?

Here is my code:
            aMsg.From = aAddressFrom
            aMsg.Subject = theSubject
            aMsg.Body = mystringbuilder.tostring  ---> NEED TO FORMAT THIS TO HELVETICA

            Dim smtp As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient
            smtp.Host = myEmailServer
            smtp.Send(aMsg)
Email Protocols.NET Programming

Avatar of undefined
Last Comment
KMBrochu

8/22/2022 - Mon
Éric Moreau

When I need to line up data into a e-mail, I send a HTML formatted body. Tables align data very easily.
ASKER
KMBrochu

OK, I can try.  Can you send an example of what it would like like with the SMTP code that I am using?
Éric Moreau

This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ASKER
KMBrochu

Hello.  I have the HTML portion working of the SMTP, but I am having difficulty getting my tables set up correctly.  It's because I am not use to reading HTML.  Can you provide an example or a resource for simple HTML tables?  Thank you!
ASKER CERTIFIED SOLUTION
Éric Moreau

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
KMBrochu

Thank you for your help.  I have it cooking.