Solved

Sending e-mail through CDOSYS

Posted on 2011-09-03
12
734 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 82

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 82

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
 

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 82

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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 82

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 82

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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Create high volume marketing opportunities using email signatures with these top 10 DOs and DON'Ts of email signature marketing.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
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 …
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: …

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now