My hoster supposedly offers several mailing components: CDONTS.NewMail, Persits.MailSender, ASPXP.Mail, and JMail.SMTPMail. I have tried all of them, and could not send a single email! So here are the code snippets:
Any help is greatly appreciated!
---
---
Code:
body1 = "filled elsewhere with some text"
'1)
Dim objNewMail
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
objNewMail.From = "cdonts@pravapis.org"
objNewMail.To = "rydel23@yahoo.com"
objNewMail.Subject = "link.asp"
objNewMail.Body = body1
objNewMail.Send
Set objNewMail = Nothing
'Error: Microsoft VBScript runtime error '800a0046' Permission denied
'2)
Dim objNewMail
Set objNewMail = Server.CreateObject("Persits.MailSender")
objNewMail.Host = "pravapis.org"
objNewMail.From = "dontreply@pravapis.org"
objNewMail.AddAddress "rydel23@yahoo.com", "uladzi@yahoo.com"
objNewMail.Subject = "link.asp"
objNewMail.Body = body1
On Error Resume Next
objNewMail.Send
If Err <> 0 Then
Response.Write "Letter was not sent due to the following error: " & Err.Description
End If
'Error: Letter was not sent due to the following error: 550 not local host yahoo.com, not a gateway
'3)
Dim objNewMail
Set objNewMail = Server.CreateObject("ASPXP.Mail")
objNewMail.Host = "pravapis.org"
objNewMail.Port = 25
objNewMail.FromAddress = "dontreply@pravapis.org"
objNewMail.ToList.Add "rydel23@yahoo.com", "uladzik@yahoo.com"
objNewMail.Subject = "link.asp"
objNewMail.PlainBody = body1
If objNewMail.Send <> 0 Then
Response.Write "Letter was not sent due to the following error: " & objNewMail.ErrorMessage
End If
'Error description: The socket replied unexpectedly.
'Expected: [250].
'Returned: [550 not local host yahoo.com, not a gateway ].
'Error Source: Adding the list of recipients
'4)
Dim objNewMail
Set objNewMail = Server.CreateObject("JMail.SMTPMail")
objNewMail.ServerAddress = "pravapis.org"
objNewMail.Sender = "dontreply@pravapis.org"
objNewMail.AddRecipient ("rydel23@yahoo.com")
objNewMail.Subject = "link.asp"
objNewMail.Body = body1
On Error Resume Next
objNewMail.Execute()
If Err <> 0 Then
Response.Write "Letter was not sent due to the following error: " & Err.Description
End If
'Error: The message was undeliverable. All servers failed to receive the message
Any help is greatly appreciated!
---
---