Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mail components - I have tried everything, but in vain!

Status
Not open for further replies.

Rydel

Programmer
Feb 5, 2001
376
CZ
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:

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 &quot;Letter was not sent due to the following error: &quot; & 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(&quot;ASPXP.Mail&quot;)
objNewMail.Host = &quot;pravapis.org&quot;
objNewMail.Port = 25
objNewMail.FromAddress = &quot;dontreply@pravapis.org&quot;
objNewMail.ToList.Add &quot;rydel23@yahoo.com&quot;, &quot;uladzik@yahoo.com&quot;
objNewMail.Subject = &quot;link.asp&quot;
objNewMail.PlainBody    = body1
If objNewMail.Send <> 0 Then
        Response.Write &quot;Letter was not sent due to the following error: &quot; & 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(&quot;JMail.SMTPMail&quot;)
objNewMail.ServerAddress = &quot;pravapis.org&quot;
objNewMail.Sender = &quot;dontreply@pravapis.org&quot;
objNewMail.AddRecipient (&quot;rydel23@yahoo.com&quot;)
objNewMail.Subject = &quot;link.asp&quot;
objNewMail.Body    = body1
On Error Resume Next
objNewMail.Execute()
    If Err <> 0 Then
        Response.Write &quot;Letter was not sent due to the following error: &quot; & Err.Description
    End If
'Error: The message was undeliverable. All servers failed to receive the message

Any help is greatly appreciated!

---
---
 
9 times out of 10 if you get this message
'Error: Microsoft VBScript runtime error '800a0046' Permission denied
the component is not set up properly or at all on the server. give them a call or whatever and let them know what is happening. A language that doesn't affect the way you think about programming is not worth knowing.
admin@onpntwebdesigns.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top