Solved

sending email via excel through outlook code not working

Posted on 2014-10-08
12
199 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
  • 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
 

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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

744 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now