Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

sending email via excel through outlook code not working

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
finnstone
Asked:
finnstone
  • 6
  • 6
1 Solution
 
Glenn RayExcel VBA DeveloperCommented:
Please attach the code snippet. :-)
0
 
finnstoneAuthor Commented:
nothing was attached
0
 
Glenn RayExcel VBA DeveloperCommented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
finnstoneAuthor Commented:
0
 
finnstoneAuthor Commented:
my bad!
0
 
Glenn RayExcel VBA DeveloperCommented:
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
 
finnstoneAuthor Commented:
that wasnt it but thx I added those
0
 
Glenn RayExcel VBA DeveloperCommented:
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
 
finnstoneAuthor Commented:
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
 
Glenn RayExcel VBA DeveloperCommented:
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
 
finnstoneAuthor Commented:
not solved but thanks for trying
0
 
Glenn RayExcel VBA DeveloperCommented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 6
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now