InfoQuest Knowledgebase InfoQuest Knowledgebase

  • Home
  • Knowledgebase
    • Billing
    • Control Panel
    • Data Center
    • Databases
    • Domains
    • Email
    • FTP
    • Hosted Exchange
    • SSL Certificates
    • Virtual Private Servers
    • Webmail
    • Website Hosting
  • FAQ
  • Contact
  • Visit InfoQuest.com
Home / Website Hosting / Using CDOSYS with authentication (POA)

Using CDOSYS with authentication (POA)

Using CDOSYS with Authentication

---------- code starts below here ---------

<!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D" NAME="CDO for Windows 2000 Library" -->
<!--METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4" NAME="ADODB Type Library" -->
<%
Dim objMail
Set objMail = Server.CreateObject("CDO.Message")
Set objConfig = Server.CreateObject("CDO.Configuration")

'Configuration:
objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort

objConfig.Fields(cdoSMTPServer)="YOUR-MAIL-SERVER-HOSTNAME"
objConfig.Fields(cdoSMTPServerPort)=25
objConfig.Fields(cdoSMTPAuthenticate)=cdoBasic
objConfig.Fields(cdoSendUserName) = "email@yourdomain.com"
objConfig.Fields(cdoSendPassword) = "xxxxxxxx"

'Update configuration
objConfig.Fields.Update
Set objMail.Configuration = objConfig

objMail.From ="email@yourdomain.com"
objMail.To = "recipient@yourdomain.com"
objMail.Subject ="Information"
objMail.TextBody="This is a test for CDO.message"
objMail.Send

If Err.Number = 0 Then
Response.Write("Mail sent!")
Else
Response.Write("Error sending mail. Code: " & Err.Number)
Err.Clear
End If
Set objMail=Nothing
Set objConfig=Nothing
%>

---------- code ends above here ---------
Website Hosting

Related Articles

  • Professional Services
  • iframe Dynamic Height Script
  • Where do I go to leave positive feedback for support?
  • Improving Website Performance

Knowledgebase Categories

  • 7Billing
  • 50Control Panel
  • 4Data Center
  • 4Databases
  • 12Domains
  • 58Email
  • 4FTP
  • 38Hosted Exchange
  • 7SSL Certificates
  • 25Virtual Private Servers
  • 5Webmail
  • 47Website Hosting

Most Helpful Articles

  • How to change WordPress siteURL to IP address using phpmyadmin (POA)
  • Remove index.php from WordPress URL (POA)
  • How To Setup An Archive Folder in Outlook for MAC (POA)
  • How to Redirect a Registered Domain (POA)
  • Share Exchange Outlook calendar on iOS devices (POA)
  • Changing the WordPress URL Path to web root “/” or another path (POA)
  • Where do I go to leave positive feedback for support?
Copyright © 2020 - InfoQuest Technologies, Inc.