Solved

sending email via excel through outlook code not working

Posted on 2014-10-08
12
206 Views
Last Modified: 2014-10-16
could someone take a look at code attached and tell me what problem is?

i think i might need the server name..? how do i find that

error is that transport not found
0
Comment
Question by:finnstone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
12 Comments
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40369581
Please attach the code snippet. :-)
0
 

Author Comment

by:finnstone
ID: 40369585
nothing was attached
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40369692
finnstone,

That's correct, you didn't attach any code, but made reference to it.  

As soon as you re-post here with your code, we'll be glad to look into it.

-Glenn
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:finnstone
ID: 40369701
0
 

Author Comment

by:finnstone
ID: 40369702
my bad!
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40369721
My first guess is that if your email server (presumably smtp.sendgrid.net) requires SMTP authentication you'll need to add a couple lines to this section of code:

            With SMTP_Config
                .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
                .Item("http://schemas.Microsoft.Com/cdo/configuration/sendusername") = "email@sendgrid.net"
                .Item("http://schemas.Microsoft.Com/cdo/configuration/sendpassword") = "YourPassword"
                'please put your server name below
                .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.sendgrid.net"
                .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
                .Update
            End With

Open in new window


...add the sendusername and sendpassword items.

-Glenn
0
 

Author Comment

by:finnstone
ID: 40369741
that wasnt it but thx I added those
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40369750
Okay, two other possibilities:
1) try a different port (25)
2) if you're on a corporate network, maybe McAfee or similar is blocking CDO.  Try an another network to test.

-Glenn
Sent from my Windows Phone
0
 

Author Comment

by:finnstone
ID: 40369759
ok we got somewhere, i just got this error message

the server response was 550 cannot receive from specified address rob@corporate_email address unauthenticated users not allowed

doesnt make sense that i can use them as my outgoing server already but this would not work
0
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 500 total points
ID: 40369828
I see you've cross-posted this question here:
http://stackoverflow.com/questions/26268576/sending-email-via-code-in-excel

I do think it is a policy issue with your internal SMTP server and there may be a restriction on relaying to outside servers.  I will wait to hear if you get a resolution there.

-Glenn
0
 

Author Closing Comment

by:finnstone
ID: 40384961
not solved but thanks for trying
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40385028
Did you try on an outside network (not corporate) to see if you were still blocked?  I'm curious if that was the issue.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Power Query Grouping By 2 21
question on substitute function 2 27
compare column in an Excel spreadsheet. 1 43
Conditional fromatting formula 29 33
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question