Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Sending e-mail through CDOSYS

Posted on 2011-09-03
12
Medium Priority
?
765 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
  • 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
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.

 

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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
By default Outlook 2016 displays only one time zone in the Calendar. The following article explains how to display two time zones in one calendar view.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

971 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