How to send email automatically from excel using macro?

Ads

This article is for those who are looking to automate excel reports. Almost every business have reports being sent periodically. May be weekly, daily, or hourly. Here i incorporate the vba script to send email automatically using macro in excel. You can directly use it in your vba code replacing your credentials.

Here i am using gmail to send email from the macro.

The above code is self explanatory, also i have added comments to the code to make you understand easily. You can play with the code to attach multiple files, include multiple recipients.

  How to Auto Delete Facebook account after Death

If you are using gmail, make a setting change in your google account.

Go to Less Secure Apps

Turn on the feature to allow excel to send email using SMTP Server. You can use any email your company’s email to send the email with an attachment.

Please Share if you find it useful. Please comment below if you face any issues. I will respond asap.

Ads

Leave a Reply