?
Solved

sending email via excel through outlook code not working

Posted on 2014-10-08
12
Medium Priority
?
213 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

762 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