|
<% set objMessage = createobject("cdo.message") set objConfig = createobject("cdo.configuration") ' Setting the SMTP Server Set Flds = objConfig.Fields Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.seudominio.com" Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "email@seudominio.com" Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "SenhaEmail" Flds.update Set objMessage.Configuration = objConfig objMessage.To = "alguem@alguem.com" objMessage.From = "email@seudominio.com" objMessage.Subject = "Exemplo de codigo usando CDO" objMessage.TextBody = "Parabens" & VbCrLf & "Se voce recebeu isso, significa que seu componente funciona" objMessage.fields.update objMessage.Send
Response.write "Enviado..." set objMessage = nothing set objConfig = nothing %>
|