Solved

Sending e-mail through CDOSYS

Posted on 2011-09-03
12
746 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 83

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 83

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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

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 83

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 83

Accepted Solution

by:
Dave Baldwin earned 500 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 83

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

Technology Partners: 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!

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

735 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