Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2006

    Unanswered: Sending mail from asp page with SMPTsvg.Mailer

    Hello Everyone, I'm trying to set up a page where a form gets emailed directly from the page, I've done some research and implemented some code that worked previously on our site under different conditions, I have looked and looked again, any help or insight would be greatly appreciated. Thank you

    PS: my error message is: Microsoft VBScript runtime error '800a01b6' Object doesn't support this property or method: 'Mailer.AddRecipient' /mv_thankyou.asp, line 111

    If (request.Form("name") <> "") then
    dim strName, strEmail, strText
    strEmail = Trim(request.Form("email"))
    strName = request.Form("name")
    strText = "E-mail from: " & strName & "From email address:"
    end if
    	set Mailer=Server.CreateObject("SMTPsvg.Mailer")
    	Mailer.FromName = "Mail Subject"
    	Mailer.FromAddress =""
    	Mailer.RemoteHost ="localhost"
    	Mailer.AddRecipient="strEmail" '(error line 111)
    	Mailer.Subject ="Thanks for volunteering!"
    	Mailer.BodyText strText
    	if Mailer.SendMail then
      Response.Write "Mail sent..."
      Response.Write "Mail send failure. Error was " & Mailer.Response
    end if 
    	set Mailer=Nothing

  2. #2
    Join Date
    Apr 2007
    The syntax is wrong according to the component. The correct syntax for that line is this:

    Mailer.AddRecipient "Name", ""
    Notice that it is separated into two parts. The first part ("Name") can be any name or an email address. The second part ("") must be a valid Email address.

    Hope this helps,


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts