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
Solved

sending email via excel through outlook code not working

Posted on 2014-10-08
12
205 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
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 use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

790 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