| <% |
| set objMessage = createobject("cdo.message") |
| set objConfig = createobject("cdo.configuration") |
| Set Flds = objConfig.Fields |
| |
| Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 |
| Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="mail.mydomain.com" |
| |
| ' ' Passing SMTP authentication |
| Flds.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication |
| Flds.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="postmaster@mydomain.com" |
| Flds.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="password" |
| |
| Flds.update |
| Set objMessage.Configuration = objConfig |
| objMessage.To = "postmaster@mydoamin.com" |
| objMessage.From = "postmaster@mydomain.com" |
| objMessage.Subject = "New Task" |
| objMessage.fields.update |
| objMessage.HTMLBody = "This is a test sent from CDO using smtp authentication." |
| objMessage.Send |
| %> |
If you run in to problems using this code, please post in our
community forum. Technical
support cannot assist with specific coding related issues.
Article ID: 617, Created On: 8/14/2009, Modified: 4/21/2011