How to Send Mail using AUTHENTICATION?

  • Thread starter Thread starter AbraAbraCadabra
  • Start date Start date
A

AbraAbraCadabra

Here is the code I have been using to send mail...

Set objCDO = Server.CreateObject("CDO.Message")
With objCDO
.To = strTo
.From = "(e-mail address removed)"
.Subject = "This is the subject"
.HtmlBody = "This is the Body"
.Send
End With
Set objCDO = Nothing

It used to work fine, but recently our mail server changed and now it
requires that AUTHENTICATION be present. How can I adjust the above code so
that I can authenticate using a username and password?

Much thanks!!
 
re:
They seem to
indicate that I will need to put something like this into my code...
"http://schemas.microsoft.com/cdo/configuration/sendusing"
Are they kidding? Am I actually going to have to put the MS domain name in my code? I'd rather
not do that. What do you think?

That's only a configuration schema. Try to access it directly and see what happens.

http://www.systemwebmail.com/faq/3.8.aspx



Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
 
That's only a configuration schema. Try to access it directly and see what
happens.

http://www.systemwebmail.com/faq/3.8.aspx

I'm sorry I don't quite understand what you mean. How would I write some
code that would send mail using authentication without having to include the
MS domain in it? I don't mean to ask you do solve the problem for me, but I
have been trying to understand this process for days now. Would it be an
easy thing for you to write some code that will send a message without
including the MS domain in it?
 
re:
I'm sorry I don't quite understand what you mean.

Apparently not.

re:
How would I write some code that would send mail using authentication without having to include
the MS domain in it?

Because the schema authentication is provided by Microsoft, for your benefit.

Maybe you should rephrase your question.

Why are you so reticent to include Microsoft's domain in your code,
if the code requires authentication schemas which Microsoft provides, for free.

re:
write some code that will send a message without including the MS domain in it?

Your only alternative is not to send authenticated mail via CDO, in ASP.NET 1.1.

You could, for example, upgrade to ASP.NET 2.0 (free upgrade),
where you don't have to use neither CDO nor the Microsoft Schemas:

http://www.systemnetmail.com/faq/4.2.aspx

All you have to do, if you upgrade, is use :

smtp.Credentials = new NetworkCredential("username", "secret");





Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
 
Back
Top