using AspMail component code sample

Discussion in 'ASP.NET / ASP.NET Core' started by futurepopbe, Feb 24, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hello,

    I would like to use the aspmail component.
    Someone has some sample code for this ??
    Many thanks !
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    <html>
    <head>
    </head>

    <%

    Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
    Mailer.FromName = "DiscountASP"
    Mailer.FromAddress= "[email protected]"
    Mailer.RemoteHost = "localhost"
    Mailer.AddRecipient "John Doe", "[email protected]"
    Mailer.Subject = "This is a sample email sent from ASPMail"
    Mailer.BodyText = "Congratulation" & VbCrLf & "If you receive this is, your mail component works"
    if Mailer.SendMail then
    Response.Write "Mail sent..."
    else
    Response.Write "Mail send failure. Error was " & Mailer.Response
    end if


    %>
    </body>
    </html>



    quote:Originally posted by futurepopbe

    Hello,

    I would like to use the aspmail component.
    Someone has some sample code for this ??
    Many thanks !
    </blockquote id="quote"></font id="quote">
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page