Sending email from Excel without knowing the email provider used or SMTP Config

Marro

New Member
Joined
Mar 6, 2017
Messages
8
I'm creating a file that will be used by multiple people, inside and outside of my organization. Some of them use gmail, some yahoo, some aol and some my company's server.

I want to create a macro that will send an excel file to a specific email regardless of the email provider. I've found some online but all the macros ask for the SMTP Config but it could be different for each user.

Thoughts?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
It's not just SMTP server, the macro needs to be individualized to incorporate each person's userid and password. So, there is no "one macro fits all" solution. For people in your organization, perhaps your IT dept can create an email account just for sending this file. All people use this email account to send file. So, same account name, same password, same SMTP server, only one macro. For those outside your organization, same idea. You create a gmail, yahoo or whatever email account and they all use that account to send the file. You problem is reduced to two email accounts, two macros.

To see who sends the file, use Application.UserName to get the Windows account name. Hope no two people have the same name. Or the macro can show an input box for people to type in their name. Better yet, let macro read a file which contains the name of the sender. But then, every one must create this file in the same directory with the same file name.
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,315
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top