"send page by e-mail"

Discussion in 'ASP General' started by Jason Steeves, Jul 25, 2005.

  1. I need to replicate the code that is found in Internet Explorer File->send
    page by e-mail. Can someone tell me how to replicate this code or just call
    this function. I need to program it to be activated by a button on my .aspx
    page......Thanks, Jason
    Jason Steeves, Jul 25, 2005
    #1
    1. Advertising

  2. <%
    Set myMail=CreateObject("CDO.Message")
    myMail.Subject="Sending email with CDO"
    myMail.From=""
    myMail.To=""
    myMail.CreateMHTMLBody "http://www.w3schools.com/asp/"
    myMail.Send
    set myMail=nothing
    %>Source: http://www.w3schools.com/asp/asp_send_email.aspRay at work"Jason
    Steeves" <> wrote in message
    news:...
    > I need to replicate the code that is found in Internet Explorer File->send
    > page by e-mail. Can someone tell me how to replicate this code or just

    call
    > this function. I need to program it to be activated by a button on my

    ..aspx
    > page......Thanks, Jason
    Ray Costanzo [MVP], Jul 25, 2005
    #2
    1. Advertising

  3. >I need to replicate the code that is found in Internet Explorer File->send
    > page by e-mail. Can someone tell me how to replicate this code or just
    > call
    > this function. I need to program it to be activated by a button on my
    > .aspx
    > page...


    This is fairly trivial, basically if you think about presenting content from
    a variable, e.g.

    myBody = "<html><head><title>..."
    response.write myBody
    ....

    Then you could also do

    myBody = "<html><head><title>..."
    mailObject.Body = myBody
    ....

    (An easier way would be to e-mail the URL to the page, since not many people
    *want* craploads of HTML in their inbox, YMMV.)

    For ASPX-specific techniques, please visit an ASP.NET newsgroup. They have
    "dotnet" as part of their name...
    Aaron Bertrand [SQL Server MVP], Jul 25, 2005
    #3
  4. First reply was a bit unreadable...

    <%
    Set myMail=CreateObject("CDO.Message")
    myMail.Subject="Sending email with CDO"
    myMail.From=""
    myMail.To=""
    myMail.CreateMHTMLBody "http://www.w3schools.com/asp/"
    myMail.Send
    set myMail=nothing
    %>

    Source: http://www.w3schools.com/asp/asp_send_email.asp

    Ray at work



    "Jason Steeves" <> wrote in message
    news:...
    > I need to replicate the code that is found in Internet Explorer File->send
    > page by e-mail. Can someone tell me how to replicate this code or just

    call
    > this function. I need to program it to be activated by a button on my

    ..aspx
    > page......Thanks, Jason
    Ray Costanzo [MVP], Jul 25, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page