How to send email from Excel

How to send email from excel based on cell value

Send email from excel will be really easy if you will read this post.

This post will give you a simple illustration of how to use the attached excel sheet to send emails or, if you need it, how to use the source code inside it in other excel files. I suggest to start from the base and modified it according to your needs.

Send email from excel : MACRO

The macro provides the following functions:

  • Reading data from excel
  • formatting body email
  • set recipients
  • set up CC
  • attach files
  • send the email
  • update sending data

excel sheet used to send email

Before to proceed it’s important to understand the meaning of the light blue arrow.

What does the LIGHT BLUE ARROW BELOW “SENT ON” mean?

It represents the range that the VBA macro automatically detects in order to process the email.

Your bulk email process can be handled by this short macro very useful and easy to manage (it’s easily implemented even by those who do not know much excel).

The excel sheet contains the information required by the macro refers (the code refers to the columns and not to the header) and a glance is sufficient to understand which kind of data we have available.

A delay has been inserted between sending an email to the other to avoid being blocked by the provider or, worse still, classified as spammers.

In case you want to add more data, add the columns always after the last provided in the example.servermx.com

This code has been tested in Excel 10 and Excel 2016 with outlook.

It’s is easily adaptable in other contexts and soon I will also provide other versions for different scenarios.

EXCEL FILE EXAMPLE & STRUCTURE – SHORT FIELD DESCRIPTION

First of all, take in account that the macro gets the first empty cell of the column H (8) and the first empty cell of column A (1) and uses these boundaries to instance the reading loop ( for .. to ..).

The column H (8) it’s very important because it’s used to store the email’s sent date  (the VBA code automatically populate this cell according to the elaborated row).

In this case, the loop while elaborate the row from 2 to 11.

EXCEL FOR SEND EMAIL  – COLUMNS & CELLS CONTENT

Even if is really intuitive let me give a brief synthesis of the columns.

  • Column A: Here you must to set the destination email (TO) and it’s a mandatory field.
  • Column B: Here you must to set presentation name used in the opening of the email (e.g. “Dear MAX “) and it’s a mandatory field.
  • Column C: It contains the email’s subject and it’s a mandatory field.
  • Column D: You can specify the signature to use at the end of the email (e.g. “Cheers Servermx.com “)  and it’s a mandatory field.
  • In column E  there is a value that can be used in the body of the email. In this example is a mandatory field, but it can update according to your needs.
  • Column F: Here you have to set the carbon copy destination of the email (CC)  and it’s an optional field.
  • The column G It’s used to get the attachment file (Attachment) and it’s an optional field.

Anyway, the code can easily update in order to change the body, subject and so on.

VISUAL BASIC CODE 

Vba macro used to send email via excel

In the end the core is :

  • Set OutlookApp = CreateObject(“Outlook.Application”)
  • Set Mess = OutlookApp.CreateItem(olMailItem)
  • With Mess
  • .Subject = Subj
  • .Body = Msg
  • .Recipients.Add (Email)
  • .CC = CC
  • .Attachments.Add (Attach)
  • .Send

DOWNLOAD

Here you can Download the excel file (it’s an xlsm ) : Email_send_blog

servermx.com 2018  servermx.offers servermx.features

How to set email web client with your domain name.

CNAME Records

it’s useful for instance, to rename a webmail client in case of your email being managed by an external provider.

CNAME stand for canonical nome a “CNAME stands for Canonical Name. CNAME records can be used to alias one name to another.”

It’s like a nickname … your name is Elizabeth but someone calls you Betty and when you hear one of two you respond…but what is more is that Betty will appear as to be your native name.

cname logo

cname

HOW TO SET WEB CLIENT WITH YOUR DOMAIN NAME

If you own your domain and entrust your email service to an external provider, it ‘s really probably that you will read the email via the client proposed by your provider that will use it’s own domain.to

This it’s not always appreciated especially from who, owning its domain, feel stronger inside the need to show it’s brand and mark its visibility.

So here we are to show how it’s easily renaming external email provider email client (Roundcube, SquirrelMail, Rainloop etc) and let it appear as is was yours.

A CNAME record on your DNS setup, basically allows that a link like: emailclient.myprovider.com being turned into myemailclient.mydomain.ltd (or whatever you need).

In your DNS panel you’ll find several records :
MX (to point the email server provider)
A (to set web entry)
etc
and you can also configure one, or more, CNAME records.

This example, you can find more details here, it’s based a servermx’ Roundcube client.

A servermx’ customer can access to its mail in several ways: one of this is the Roundcube client at roundcube.servemx.com.

If the customer domain, for instance, being mydomain.com he must to:
Go to DSN PANEL
ADD CNAME mywebclient.mydomain.com roundcube.servemx.com

MX cpanel setup

MX cpanel setup

Save!!!
That’s all
Now mywebclient.mydomain.com will point the Roundcube client of the external email provider, but the link showed to the email user will be
emailclient.shopstars.com and your custom Webmail URL will be set up.

Email and Web Hosting Separate? Excellent choice.

Email and Web Hosting Separate? Excellent choice.

When you purchase website hosting your website host usually offer you email boxes included in your pack.

The final result is, more or less, Something like name@surname.com : Professional, not anonymous an with your brand or name clearly stated.

In most cases, it’s not the best idea to have your email hosted by your website host.

Following we’ll share with you our idea why it’s an agreeable idea to save your email far from your website hosting, the best options for email, and details on how to set up email for yourself.

email vs vps

servermx

One problem is that you are Hosting your email and website on the same server.
Another one is that, usually, the “email” features is a core function of your business but it doesn’t for a hosting provider (The core business it’s the hosting) and even the support provides is secondary, in terms of quality, if compared to the one provided for the hosting.
One more issue might be that the Website hosting is not reliable and if the Hosting goes down for 1 day also your email goes down for 1 day.

Using website hosting for your email could chain you for more than the time you want.

Maybe at some point, you could decide to move your website somewhere else. Migrating a website is simple but migrating email can be a nightmare.

Obviously, If you worked with a reliable VPS or Dedicated Server it’s could seem ok, but you should take into account the infrastructure management costs and how to scale any further needs.

Proposal

Worldwide, There are several solutions, and one is ours.

Our solutions for the email is focused on :
Support, Reliability, Features, Flexibility.

The support is the king for so important service such as the email.
That’s why we like to say that we provide a proactive support (it’s better to prevent a problem than facing) and we have in place several tools (lot of them highly customized to better fit the customer needs) to detect issues about, for instance: Privacy, Spam Management, Attachment management and so on.

We invest also in new features to make easier the email management such as, for example, the “Dropbox upload management” that allows to our customer to get the email attachment straight to in their Dropbox account without reading the email (it’s a features server-side based).

https://www.servermx.com/en/features.html here there are the major features provided by Servermx.