Videos
Check out our tutorial video series.
Send email in Visual basic. VBA scripting has built in mailing functionality. Use SMTPClient to send mail and attachments.
Visual Basic is a powerful scripting language from Microsoft that has many uses. Sending email with VBA is easy using the package. In this post we will demonstrate how to setup VBA with SMTP mailserver credentials and then send emails from code or tests.
To send email in visual basic you need access to a MailServer (or API such as MailSlurp). In this example we will use a MailServer hosted by MailSlurp to configure our VBA client. If you already have a MailServer you can skip to the next step.
Next, take the password, username, host, and port and configure the SMTP client:
Once configured we can use the instance to send an email:
You can also use MailSlurp directly in Excel using Power Query. Check out the guide here.
Check out our tutorial video series.
Email and SMS guides for automation and testing.
View github project code for multiple languages.
Latest posts from the MailSlurp team.
Test, build, and automate messaging with a free MailSlurp account.