Has anyone worked with CDOSYS for sending system emails? I need help

foozball3000

Executive Member
Joined
Oct 28, 2008
Messages
5,828
Hi guys, I'm busy setting up the systems for my new venture.
So for this I need some system emails sent. Sounds easy enough, right? I thought so too...
So I created a system email address on my domain, got the details needed and added it to the code.

Nothing. (Can't remember what the error was)

Right, changed the details to my yahoo address. Works perfectly.

So emailed Afrihost asking what's up with this, and I get this reply...

Hi Johan,

You have to use CDOSYS script to send mails. Please see below URL:
http://answers.afrihost.com/3139/ho...iler-with-smtp-authentication?show=3139#q3139

The mail server is aldur.aserv.co.za, port is 25 and you have to enable basic clear text authentication in script. In From field, please use a mail account you have created via cPanel.

Please check and let us know if any issue persists.

Am I missing something glaringly obvious? Because that link wasn't helpful in any way.
I also tried finding some info about CDOSYS in the MSDN library. Seems that the last article posted about it was over 10 years ago. And most of the reference links are dead links.

(My site is being built in ASP.Net, C# Framework 4.5)

I'll attach a screenshot of the code below.
 

deweyzeph

Honorary Master
Joined
Apr 17, 2009
Messages
10,543
The .NET framework has a perfectly good library in the System.Net.Mail namespace for sending SMTP email. There's no need to use CDONTS.
 

foozball3000

Executive Member
Joined
Oct 28, 2008
Messages
5,828
The .NET framework has a perfectly good library in the System.Net.Mail namespace for sending SMTP email. There's no need to use CDONTS.

That's what I thought too. Afrihost disagrees...
So I received a fresh set of settings from them, and I get this response from the mail server :
"Mailbox unavailable. The server response was: Access denied - Invalid HELO name (See RFC2821 4.1.1.1)"

Emailed that to them, then they just responded with this:
Hi Johan,

For the domains hosted in the Windows server, we support only CDOSYS mail scripts.

You can refer the details in the below link.
-----
https://support.afrihost.com/?/Know.../18/how-do-i-setup-a-cdosys-mailer-on-my-site
-----

You contact your developer and add the codes.

Which wasn't helpful in any way
 

deweyzeph

Honorary Master
Joined
Apr 17, 2009
Messages
10,543
They're talking absolute rubbish. It doesn't make any difference which SMTP library you use, all SMTP servers use the same SMTP protocol. An SMTP server is completely agnostic to what "script" is being used to communicate with it, as long as the library you're using speaks proper SMTP.
 

foozball3000

Executive Member
Joined
Oct 28, 2008
Messages
5,828
By the way, the error you're getting is related to the SMTP username and password you're using not being correct. It has nothing to do with what library you're using. Check out:

http://stackoverflow.com/questions/...lable-the-server-response-was-access-denied-i

What's that saying about bugs that resolve themselves? :wtf:

So I went back now to double check the Afrihost Mail settings to make sure that the From address is the same as the Username, which it was all along. (Like the guy from your link did)
Exactly the same code that didn't work at the start of the month, magically now works.

Thank you :)

I'm still making plans for a different Hosting company. If this whole experience has taught me one thing, Afrihost's support is abysmal, and it's not the sort of thing you want for a business idea.
 

Thor

Honorary Master
Joined
Jun 5, 2014
Messages
44,236
They're talking absolute rubbish. It doesn't make any difference which SMTP library you use, all SMTP servers use the same SMTP protocol. An SMTP server is completely agnostic to what "script" is being used to communicate with it, as long as the library you're using speaks proper SMTP.

But does it surprise you?
 
Top