Hi,
I'm a new ASP programmer, and I have a simple question:
"How can I send e-mail using ASP ?"
My server has NT 4, IIS 4 and Exchange Server 5.5 installed.
I've tried MAPI.Session and CDONTS.NewMail, but both didn't work.
MAPI.Session code:
1 Set oCDO = CreateObject("MAPI.Session"
2 oCDO.Logon , , , , , , "SYSPLAN01" & vbLf & "Administrador"
3 Set oPasta = oCDO.Outbox
4 Set oMensagens = oPasta.Messages
5 Set oMsg = oMensagens.Add
6 oMsg.Subject = "Teste - " + Request.Form("Sistema"
7 cTexto = "Text1: " + Request.Form("Text1" & vbCrLf
8 cTexto = cTexto + "E-mail: " + Request.Form("E-mail"
9 oMsg.Text = cTexto
10 Set oRcpt = oMsg.Recipients
11 oRcpt.Add , "SMTP:email@server.com.br"
12 oRcpt.Resolve
13 oMsg.Send False
14 oCDO.Logoff
MAPI.Session error:
Collaboration Data Objects erro '0000505'
You do not have permission to log on. [Microsoft Exchange Server Information Store - [MAPI_E_FAILONEPROVIDER(8004011D)]]
line: 4
CDONTS.NewMail code:
1 set oMsg = CreateObject("CDONTS.NewMail"
2 oMsg.From = Request.Form("E-mail"
3 oMsg.To = "email@server.com.br"
4 oMsg.Subject = "Teste - " + Request.Form("Sistema"
5 cTexto = "Text1: " + Request.Form("Text1" & vbCrLf
6 cTexto = cTexto + "Email: " + Request.Form("E-mail"
7 oMsg.Body = cTexto
8 oMsg.Importance = 1
9 oMsg.Send()
10 set oMsg = nothing
CDONTS.NewMail error:
error '80070003'
The system could not find the specified path.
line 9
Thanks a lot
I'm a new ASP programmer, and I have a simple question:
"How can I send e-mail using ASP ?"
My server has NT 4, IIS 4 and Exchange Server 5.5 installed.
I've tried MAPI.Session and CDONTS.NewMail, but both didn't work.
MAPI.Session code:
1 Set oCDO = CreateObject("MAPI.Session"
2 oCDO.Logon , , , , , , "SYSPLAN01" & vbLf & "Administrador"
3 Set oPasta = oCDO.Outbox
4 Set oMensagens = oPasta.Messages
5 Set oMsg = oMensagens.Add
6 oMsg.Subject = "Teste - " + Request.Form("Sistema"
7 cTexto = "Text1: " + Request.Form("Text1" & vbCrLf
8 cTexto = cTexto + "E-mail: " + Request.Form("E-mail"
9 oMsg.Text = cTexto
10 Set oRcpt = oMsg.Recipients
11 oRcpt.Add , "SMTP:email@server.com.br"
12 oRcpt.Resolve
13 oMsg.Send False
14 oCDO.Logoff
MAPI.Session error:
Collaboration Data Objects erro '0000505'
You do not have permission to log on. [Microsoft Exchange Server Information Store - [MAPI_E_FAILONEPROVIDER(8004011D)]]
line: 4
CDONTS.NewMail code:
1 set oMsg = CreateObject("CDONTS.NewMail"
2 oMsg.From = Request.Form("E-mail"
3 oMsg.To = "email@server.com.br"
4 oMsg.Subject = "Teste - " + Request.Form("Sistema"
5 cTexto = "Text1: " + Request.Form("Text1" & vbCrLf
6 cTexto = cTexto + "Email: " + Request.Form("E-mail"
7 oMsg.Body = cTexto
8 oMsg.Importance = 1
9 oMsg.Send()
10 set oMsg = nothing
CDONTS.NewMail error:
error '80070003'
The system could not find the specified path.
line 9
Thanks a lot