Hello. I'm looking for an example of how to do this in C#.
Particulary the CDO.Configurati on stuff. I'm currently using
System.Web.Mail .MailMessage and System.Web.Mail .SmtpMail to send
messaged, but I need to set this "sendusing" attribute and don't know
the syntax for doing it in C#. Thanks!!
sch = "http://schemas.microso ft.com/cdo/configuration/"
Set cdoConfig = Server.CreateOb ject("CDO.Confi guration")
With cdoConfig.Field s
.Item(sch & "sendusing" ) = 2 ' cdoSendUsingPor t
.Item(sch & "smtpserver ") = "<enter_mail.se rver_here>"
.update
End With
Set cdoMessage = Server.CreateOb ject("CDO.Messa ge")
With cdoMessage
Set .Configuration = cdoConfig
.From = "from@me.co m"
.To = "to@me.com"
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO.message"
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
Particulary the CDO.Configurati on stuff. I'm currently using
System.Web.Mail .MailMessage and System.Web.Mail .SmtpMail to send
messaged, but I need to set this "sendusing" attribute and don't know
the syntax for doing it in C#. Thanks!!
sch = "http://schemas.microso ft.com/cdo/configuration/"
Set cdoConfig = Server.CreateOb ject("CDO.Confi guration")
With cdoConfig.Field s
.Item(sch & "sendusing" ) = 2 ' cdoSendUsingPor t
.Item(sch & "smtpserver ") = "<enter_mail.se rver_here>"
.update
End With
Set cdoMessage = Server.CreateOb ject("CDO.Messa ge")
With cdoMessage
Set .Configuration = cdoConfig
.From = "from@me.co m"
.To = "to@me.com"
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO.message"
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
Comment