Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sending e-mail through CDOSYS

Posted on 2011-09-03
12
Medium Priority
?
756 Views
Last Modified: 2013-11-27
What does it mean if I can only send myself an e-mail through the SMTP server at my ISP and any other address gives me the error message.

"550 not permitted to relay through this server"

I'm connecting via a secure SSL connection using a valid username / address, I'm I missing something in CDO, or will this just not work at this ISP?

0
Comment
Question by:David Smithstein
[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
  • 5
12 Comments
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 36478605
"550 not permitted to relay through this server" usually means that the 'From' address is not one of their user accounts.  Most ISPs have this policy to prevent spam.
0
 

Author Comment

by:David Smithstein
ID: 36478650
But the e-mail is "from" myself in both cases, the first is from me to me, and the one that doesn't work is from me and to some other e-mail address.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 36478674
Then you may need to 'authenticate' to 'relay' email.  See the section about authentication here: http://www.powerasp.com/content/new/sending_email_cdosys.asp

My primary mail server requires me to log in and 'receive' my email before I am allowed to 'send' email.  You just have to find out what the requirements are.  What email client are you using?  What ISP?
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

Assisted Solution

by:David Smithstein
David Smithstein earned 0 total points
ID: 36478773
I use bluehost.com

Here's my code, minus the username/passwords.  the connection information is out of my Outlook account settings.
=================================================================

Set objMessage = CreateObject("CDO.Message")

   
   objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
   objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "box781.bluehost.com"
   objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
   objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
   objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
   objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/authenticate") = 1
   objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "me@myemailaddress.com"
   objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "mypassword"   'Your password on the SMTP server"
   
   
    objMessage.Configuration.Fields.Update
   
    objMessage.Subject = Subjct
    objMessage.From = Sender
    objMessage.To = ToList
    objMessage.TextBody = BodyTxt
   
    objMessage.Send
===========================================================
0
 

Author Comment

by:David Smithstein
ID: 36478787
What's interesting is that I can still send myself e-mail if i have the wrong password or e-mail address for authentication.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 36478921
Since Bluehost does not support Windows hosting, you must be trying to send that from your home computer and that is probably the problem.  Most hosting companies will only send email out from pages on their web servers.  Being hosted on the web server itself is considered adequate authentication.
0
 

Author Comment

by:David Smithstein
ID: 36479073
Now that we know what the problem is, what's the solution?  

One of my products is a hosted .mde application on a Windows 2008 server where local Outlook configuration would be redundant with most users existing e-mail.

What is my best option to I get my SMTP/CDO code to work?
0
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 36479124
"where local Outlook configuration would be redundant with most users existing e-mail."  I have no idea what that means.  If you are selling a software that runs on Window Server 2008, why don't you just install IIS and the SMTP server that comes with it and send it thru that?  What are you trying to send out?

If you are trying to send out bulk email like newsletters, your problems have just barely started.  If you want to send out newsletters, most of us recommend that you use one of the bulk email services like Constant Contact to do that.  They have their own servers and spend all of their time trying to make sure that the emails go thru.  They also provide tracking info.
0
 

Author Comment

by:David Smithstein
ID: 36479157
Not newsletters, I already use Constant Contact for that.  I have a quality and material management database applilcation with an integrated e-mail module that can integrate with Outlook using MAPI on the desktop, but when I host it on Windows 2008 server, each user can access it over the web using AD on the srever for authentication and an application publishing application called RASS to open an .mde in each users AppData/Local folder connected to a comment MySQL database (about 292 tables worth)

SInce most already have a desktop Outlook installation, making them maintain another one on the server for MAPI integration isn't a good solution, hence the SMTP effort.

So i'm just enabling my users to send e-mail about needed document reviews and other quality system activities over the web.

I found IIS and the SMTP e-mail section on my server, it looks like I still need to configure SMTP server credentials, or is my server capable of being a SMTP server?  How to I configure my server to send out SMTP e-mail?
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 36479177
The SMTP server that comes with IIS is a complete server.  I have used it on IIS5.1 to send email everywhere though some places will reject email from non-routeable IPs.  If you are going to send through an ISP or Exchange, you will probably need authentication and a valid email address (for that service) to send with.  I don't have IIS7 to tell you more about the setup details.  You can click on "Request Attention" above and get the IIS zones added to your question.
0
 

Author Closing Comment

by:David Smithstein
ID: 36501297
Thanks Dave, I found some instructions on the web, and will see if I can get it to work before I post under IIS.
0
 
LVL 21
ID: 36481605
I use VBA/CDO with a gmail account. The nice thing about gmail is that you get a copy of your  emails saved in your sent items folder.



0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

730 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