Hi,
I've tried all the possible asp mail options I could find, it still doesn't
work. I've installed SMTP, the remote server, and CDO is also installed. I
either get a <<...>> (MAPI_LOGON_FAILED(80040111) or the
"Mail send failure. Error was Operation timed out" message from the asp
script.
Can someone please help me?
dirk
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "neethlin"
Mailer.FromAddress= "dirk.neethling2@h..."
Mailer.RemoteHost = "BYNIS052"
Mailer.AddRecipient "neethling, dirk", "dirk.neethling2@h..."
Mailer.Subject = "Great SMTP Product!"
Mailer.BodyText = "Dear Stephen: Your widgets order has been processed!"
if Mailer.SendMail then
Response.Write "Mail sent..."
else
Response.Write "Mail send failure. Error was " & Mailer.Response
end if
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.To = "dirk.neethling2@h..." 'set 'To' address
objMail.From = "dirk.neethling2@h..." 'set 'From'
address
objMail.Value("Reply-To") = "dirk.neethling2@h..." 'set 'Reply to'
address
objMail.Subject = "Hi there from me" 'set the subject line
objMail.Body = "This is a test message" 'set the message content
'objMail.Send 'and send the message
Set objMail = Nothing 'then destroy the component
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dim CDOSession, oFolder, oMessages, oMsg, oRcpt
Set CDOSession = Server.CreateObject("MAPI.Session")
CDOSession.Logon '( "Exchange Profile"
Set oFolder = CDOSession.Outbox
set oMessages = oFolder.Messages
set oMsg = oMessages.Add
set oRcpt = oMsg.Recipients
oRcpt.Add, "SMTP:dirk.neethling2@h...", CDOTo
oRcpt.Resolve
oMsg.Subject = "Test Msg"
oMsg.Text = "Text Msg..."
oMsg.Send
CDOSession.Logoff
Set CDOSession = Nothing