Tag: VB 2010 BackgroundWorker

1 articles found.

Sending Email in Microsoft Visual Studio 2010

Visual Basic email application, editable recipient and subject, Windows Forms message editor, SMTP sending tutorial

Hello friends! In this second part of our Visual Basic email tutorial, we will turn the simple sender into a usable Windows Forms application. You will enter the recipient, subject and message on the form instead of changing those values inside the source code. If you have not completed How to Send Email in Microsoft Visual Studio 2010, start there. That lesson explains SMTP settings, permitted sender accounts, STARTTLS and the limitations of the legacy System.Net.Mail API. Here we will concentrate on the form, input validation and the send operation. We will retain the original controls and the step-by-step teaching flow, then improve the application so that a slow mail server does not freeze its interface. The sender account remains configured separately; allowing someone to type a destination address is different from letting them sign in to any email account. The first application used a fixed recipient and message. Our new form accepts those values from the user. The SMTP hostname, port, authenticated account and permitted From address remain application settings, using the same environment-variable convention as part one. This separation keeps the first extension manageable. A typing mistake in the recipient field should not also change the server that receives the account credential. If you later add account settings, put them in a deliberate configuration workflow and explain which providers and authentication methods the application supports. We will support one ...