Sending mail


Well-known Member
I was using a CDO sub to send mail and it work great. I now have upgraded my computer and bought the
newest subscription for Excel. I am not sure what happened but the sub does not work any more. I
am hoping someone will be able to give me some code that will work. This has ruined my entire
program which took me months to built. Thank You


Well-known Member
You are in for a trial and error phase ...

Maybe your firewall is not letting you access the SMTP server

You should review your firewall configuration


Well-known Member
I don't thing it's the firewall because another person on here tried to make it work and couldn't. The routine I use is from Ron de Bruin. He is very good with excel. I VERY much do need a fix for this soon so if you can help it would be great.
You can see the code if you type into google "sending emails with CDO"


Well-known Member
I know pretty well Ron's code ... since have been using it for years ...

The question is Office 365 ... and the SMTP server ...


Well-known Member
OK. Please help me out here. I use Norton for my internet security. What do I look for?


Well-known Member
Here is what I have done. Hope this helps. I shut off the firewall completely. When I ran the code I got the error message:

Runtime error '-2147220978(8004020e)':
The server rejected the sender's address.
The sever response was 550 5.1.0 Authentication required.

I have no idea what that means. If you can help it would be GREATLY appreciated.
I checked and everything I entered for my email and passwords are correct. I also tried different ports & sendusing numbers

This is what I use:

.Item("") = 2
.Item("") = ""
.Item("") = 587
.Item("") = 1
.Item("") = ""
.Item("") = "my password for Comcast email"

Thank You


Well-known Member
I have been through it at least 15 times and it still doesn't work. I think it's windows 10 that is doing it because I tried it on a friends computer which is not updated to 10 and it worked fine. Is there anywhere else I might get some help?

Some videos you may like

This Week's Hot Topics

  • Get External Data (long shot question!)
    This is likely a long shot but I am wondering if it is at all possible for Excel to somehow 'change' the contents of a URL that is being linked to...
  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • Cell Formatting
    Good Morning, I need to format a few different cells in the following manners: A1 has to always add a colon (:) after whatever is typed in by a...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • Workbook_Change stopped working !
    I am working on an app to speed up & automate processing of Credit Cards statements. After data is input from a CSV file, it is presented to the...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...