Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 20
  1. #1
    Utente di HTML.it L'avatar di Aki
    Registrato dal
    Dec 2002
    Messaggi
    2,206

    [vbs]mail con pagina web

    Salve raga
    Ho questo blocco script asp
    codice:
    <%
    Set Msg = CreateObject("CDO.Message")
    
      ' assume constants are defined within script file
      msg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")       = 2 ' cdoSendUsingPort
      msg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "xxx.xxx.xxx.xxx"
      msg.Configuration.Fields.Update
    
          msg.To       = """User A"" <example@example.com>"
          msg.From     = """User B"" <exampleB@example.com>"
          msg.Subject  = "Hows it going? I've attached my web page"
          msg.CreateMHTMLBody = "http://localhost"
          msg.Send
    		set msg = nothing
    %>
    che dovrebbe eseguire e inviare via mail la pagina localhost al mio indirizzo, ma dà 'sto errore:
    The page cannot be displayed
    There is a problem with the page you are trying to reach and it cannot be displayed.

    --------------------------------------------------------------------------------

    Please try the following:

    Click the Refresh button, or try again later.

    Open the localhost home page, and then look for links to the information you want.
    HTTP 500.100 - Internal Server Error - ASP error
    Internet Information Services

    --------------------------------------------------------------------------------

    Technical Information (for support personnel)

    Error Type:
    Microsoft VBScript runtime (0x800A01B6)
    Object doesn't support this property or method: 'CreateMHTMLBody'
    /wcv/MAIL/send.asp, line 21


    Browser Type:
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)

    Page:
    GET /wcv/MAIL/send.asp

    Time:
    Tuesday, September 21, 2004, 8:54:21 AM


    More information:
    Microsoft Support

  2. #2
    L'istruzione

    codice:
    msg.CreateMHTMLBody
    Non esiste con CDOSYS.
    Per il corpo la sintassi prevede .HTMLBody oppure TextBody a seconda se lo si vuole formattare in HTML o testo.

  3. #3
    Utente di HTML.it L'avatar di Aki
    Registrato dal
    Dec 2002
    Messaggi
    2,206
    Originariamente inviato da weppos
    L'istruzione

    codice:
    msg.CreateMHTMLBody
    Non esiste con CDOSYS.
    Per il corpo la sintassi prevede .HTMLBody oppure TextBody a seconda se lo si vuole formattare in HTML o testo.
    ok,
    ma io voglio mandare una pagina web
    indicandone il link

  4. #4
    E dove sta il problema.
    USa come istruzione .HTMLBody che come detto formatta in formato HTML ed inserisci l'indirizzo con la sintassi classica HTML.

  5. #5
    Utente di HTML.it L'avatar di Aki
    Registrato dal
    Dec 2002
    Messaggi
    2,206
    ah ok
    provo

  6. #6
    Utente di HTML.it L'avatar di Aki
    Registrato dal
    Dec 2002
    Messaggi
    2,206
    non invia 'na cippa

  7. #7
    Originariamente inviato da Aki
    non invia 'na cippa
    COme hai scritto il codice?

  8. #8
    Utente di HTML.it L'avatar di Aki
    Registrato dal
    Dec 2002
    Messaggi
    2,206
    ora il codice è così
    codice:
    <%
    Set msg = CreateObject("CDO.Message")
    
      ' assume constants are defined within script file
      msg.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 ' cdoSendUsingPort
      msg.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "xxx.xxx.xxx.xxx"
      msg.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
    '  msg.Configuration.Fields.Item("cdoSMTPConnectionTimeout") = 10 ' quick timeout
      msg.Configuration.Fields.Update
    
          msg.To       = """User A"" <simone.burdo@gmail.com>"
          msg.From     = """User B"" <simone.burdo@unz.com>"
          msg.Subject  = "Hows it going? I've attached my web page"
          msg.HTMLBody = "<html><bodY><a>http://localhost</a></body></html>"
          msg.Send
    		set msg = nothing
    %>
    ma manda il testo
    aiutoooooooooooo

  9. #9
    Utente di HTML.it L'avatar di Aki
    Registrato dal
    Dec 2002
    Messaggi
    2,206
    ops
    l'HTMLBody l'ho cambiato con questa stringa:
    codice:
    "<html><bodY>http://localhost</body></html>"

  10. #10
    Utente di HTML.it L'avatar di Aki
    Registrato dal
    Dec 2002
    Messaggi
    2,206
    ora mi invia come mail il semplice link al localhost

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.