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 naps
    Registrato dal
    May 2001
    Messaggi
    465

    formattazione .TextBody

    Per non impazzire a scrivere bene gli spazi, le virgolette...
    qualcuna sa darmi una alternativa per scrivere questo:


    codice:
    DIM iMsg, Flds, iConf
    
    Set iMsg = CreateObject("CDO.Message")
    Set iConf = CreateObject("CDO.Configuration")
    Set Flds = iConf.Fields
    
    Flds(cdoSendUsingMethod) = cdoSendUsingPort
    Flds(cdoSMTPServer) = "smtp.aruba.it" 
    Flds(cdoSMTPServerPort) = 25
    Flds(cdoSMTPAuthenticate) = cdoAnonymous ' 0
    Flds.Update
    
    With iMsg
       Set .Configuration = iConf
       .To = invioA
       .From = Request.Form("email")
       .Sender = invioDa
       .Subject = "Oggetto della email - " & "Prova"
       .TextBody = "" & vbCrLf & "Ultimate Rolex Daytona - Paypal" & ":"& "" & vbCrLf & "" & vbCrLf & "First Name: " & firstname & vbCrLf & "" & "Last Name: " & lastname & vbCrLf & "" & "Company: " & company2 & vbCrLf & "" & "Email: " & email2 & vbCrLf & "" & "Address: " & indirizzo & vbCrLf & "" & "City: " & citta & vbCrLf & "" & "State: " & stato & vbCrLf & "" & "Cap: " & cap & vbCrLf & "" &  vbCrLf & "" 
       .Send
    End With

  2. #2
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Puoi pure andare a capo...
    codice:
    txt = "Ultimate Rolex Daytona - Paypal" & ":"& "" & vbCrLf & vbCrLf &_
    "First Name: " & firstname & vbCrLf &_
    "Last Name: " & lastname & vbCrLf &_
    "Ecc..."
    .TextBody = txt
    Roby

  3. #3
    Utente di HTML.it L'avatar di naps
    Registrato dal
    May 2001
    Messaggi
    465
    ho provato come mi dici ma restituisce errore:


    codice:
    Tipo di errore:
    (0x8004020E)
    Impossibile modificare o eliminare un oggetto che è stato aggiunto utilizzando COM+ Admin SDK 
    /urd2012/elaboration.asp, line 126
    linea 126 corrisponde su .Send

    codice:
    <%
    '============Linkbruttocane su specifiche MSDN================
    '*   il corpo finale del messaggio contiene tutti i campi    *
    '*   inseriti nella pagina html, in pratica puoi mettere     *
    '*   tutti i campi che ti servono nel modulo di invio senza  *
    '*   fare altre configurazioni aggiuntive.                   *  
    '=============================================================
    
    DIM corpoMessaggio, numeroCampi, invioA, invioDa, nomeDominio, indirizzoIp, modulo, browserSistemaOperativo
    
    	'* voce da modificare con il proprio indirizzo email
    	
    invioA =  "miamail@gmail.com"
    
    	'* voce da modificare con un indirizzo email che funga da mittente: 
    	'* in caso di errore riceverete notifica a questo indirizzo un MAILER-DAEMON
    	'* dato che cdosys supporta questa notifica
    		
    invioDa =  "miamail@gmail.com"
    
    '------------fine modifiche necessarie------------------
    
    nomeDominio 				= Request.ServerVariables("HTTP_HOST")
    indirizzoIp					= Request.ServerVariables("REMOTE_ADDR") 
    modulo						= Request.ServerVariables("HTTP_REFERER")
    browserSistemaOperativo		= Request.ServerVariables("HTTP_USER_AGENT")
    
    firstname					= Request.Form("firstname")
    lastname					= Request.Form("lastname")
    company2					= Request.Form("company2")
    email2						= Request.Form("email2")
    indirizzo					= Request.Form("indirizzo")
    citta						= Request.Form("citta")
    stato						= Request.Form("stato")
    cap					        = Request.Form("cap")
    selezionenazione		    = Request.Form("selezionenazione")
    telefono					= Request.Form("telefono")
    codfisc						= Request.Form("codfisc")
    
    otherfirstname				= Request.Form("otherfirstname")
    otherlastname				= Request.Form("otherlastname")
    othercompany				= Request.Form("othercompany")
    otheremail					= Request.Form("otheremail")
    otherindirizzo				= Request.Form("indirizzo")
    othercitta					= Request.Form("othercitta")
    otherstato					= Request.Form("otherstato")
    othercap					= Request.Form("othercap")
    otherselezionenazione		= Request.Form("otherselezionenazione")
    othertelefono			    = Request.Form("othertelefono")
    
    tipopagamento				= Request.Form("tipopagamento")
    infospedizione				= Request.Form("infospedizione")
    selezionegift				= Request.Form("selezionegift")
    notegift  				    = Request.Form("notegift")
    selectinvoice				= Request.Form("selectinvoice")
    vatpiva				        = Request.Form("vatpiva")
    
    iagree						= Request.Form("iagree")
    privacy					    = Request.Form("privacy")
    
    
    
    
    	'*rilevo i campi del form
    	
    FOR numeroCampi = 1 TO (Request.Form.Count() - 1)
       IF NOT Request.Form(numeroCampi) = "" THEN
          corpoMessaggio = corpoMessaggio & vbCrLf & Request.Form.Key(numeroCampi) & " = " & Trim(Request.Form(numeroCampi))
       END IF
    NEXT
    
    	'* creo gli oggetti cdosys sul server e li gestisco
    	
    DIM iMsg, Flds, iConf
    
    Set iMsg = CreateObject("CDO.Message")
    Set iConf = CreateObject("CDO.Configuration")
    Set Flds = iConf.Fields
    
    Flds(cdoSendUsingMethod) = cdoSendUsingPort
    Flds(cdoSMTPServer) = "smtp.aruba.it" 
    Flds(cdoSMTPServerPort) = 25
    Flds(cdoSMTPAuthenticate) = cdoAnonymous ' 0
    Flds.Update
    
    With iMsg
       Set .Configuration = iConf
       .To = invioA
       .From = Request.Form("email")
       .Sender = invioDa
       .Subject = "Ultimate Rolex Daytona - " & "Paypal"
       txt = "Ultimate Rolex Daytona - Paypal" & ":"& "" & vbCrLf & vbCrLf &_
    "First Name: " & firstname & vbCrLf &_
    "Last Name: " & lastname & vbCrLf &_
    "Company: " & company2 & vbCrLf &_
    "Email: " & email2 & vbCrLf &_
    "Address: " & indirizzo & vbCrLf &_
    "City: " & citta & vbCrLf &_
    "State: " & stato & vbCrLf &_
    "Cap: " & cap & vbCrLf &_
    "Country " & selezionenazione & vbCrLf &_
    "Phone: " & telefono & vbCrLf &_
    "Cod Fisc: " & codfisc & vbCrLf &_
    "Shipping Address: " & "" & vbCrLf &_
    "First Name: " & otherfirstname & vbCrLf &_
    "Last Name: " & otherlastname & vbCrLf &_
    "Company: " & othercompany2 & vbCrLf &_
    "Email: " & otheremail2 & vbCrLf &_
    "Address: " & otherindirizzo & vbCrLf &_
    "City: " & othercitta & vbCrLf &_
    "State: " & otherstato & vbCrLf &_
    "Cap: " & othercap & vbCrLf & "" &_
    "Country " & otherselezionenazione &_
    "Phone: " & othertelefono & vbCrLf &_
    "Payment Method: " & tipopagamento & vbCrLf &_
    "Special Delivery Instruction: " & infospedizione & vbCrLf &_
    "It's a Gift: " & selezionegift & vbCrLf &_
    "Note Gift: " & notegift & vbCrLf &_
    "Invoice: " & selectinvoice & vbCrLf &_
    "VAT / p.IVA: " & vatpiva & vbCrLf &_
    "I agree: " & iagree & vbCrLf &_
    "Privacy: " & privacy & vbCrLf &_
    .TextBody = txt
    .Send
    End With
    
    Response.Redirect "response_cheque.asp"
    
    %>

  4. #4
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    "Privacy: " & privacy & vbCrLf

    Roby

  5. #5
    Utente di HTML.it L'avatar di naps
    Registrato dal
    May 2001
    Messaggi
    465
    sempre lo stesso errore

  6. #6
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Non è possibile rivediamo cosa hai scritto.

    Roby

  7. #7
    Utente di HTML.it L'avatar di naps
    Registrato dal
    May 2001
    Messaggi
    465
    codice:
    
    <%
    '============Linkbruttocane su specifiche MSDN================
    '*   il corpo finale del messaggio contiene tutti i campi    *
    '*   inseriti nella pagina html, in pratica puoi mettere     *
    '*   tutti i campi che ti servono nel modulo di invio senza  *
    '*   fare altre configurazioni aggiuntive.                   *  
    '=============================================================
    
    DIM corpoMessaggio, numeroCampi, invioA, invioDa, nomeDominio, indirizzoIp, modulo, browserSistemaOperativo
    
    	'* voce da modificare con il proprio indirizzo email
    	
    invioA =  "miamail@gmail.com"
    
    	'* voce da modificare con un indirizzo email che funga da mittente: 
    	'* in caso di errore riceverete notifica a questo indirizzo un MAILER-DAEMON
    	'* dato che cdosys supporta questa notifica
    		
    invioDa =  "miamail@gmail.com"
    
    '------------fine modifiche necessarie------------------
    
    nomeDominio 				= Request.ServerVariables("HTTP_HOST")
    indirizzoIp					= Request.ServerVariables("REMOTE_ADDR") 
    modulo						= Request.ServerVariables("HTTP_REFERER")
    browserSistemaOperativo		= Request.ServerVariables("HTTP_USER_AGENT")
    
    firstname					= Request.Form("firstname")
    lastname					= Request.Form("lastname")
    company2					= Request.Form("company2")
    email2						= Request.Form("email2")
    indirizzo					= Request.Form("indirizzo")
    citta						= Request.Form("citta")
    stato						= Request.Form("stato")
    cap					        = Request.Form("cap")
    selezionenazione		    = Request.Form("selezionenazione")
    telefono					= Request.Form("telefono")
    codfisc						= Request.Form("codfisc")
    
    otherfirstname				= Request.Form("otherfirstname")
    otherlastname				= Request.Form("otherlastname")
    othercompany				= Request.Form("othercompany")
    otheremail					= Request.Form("otheremail")
    otherindirizzo				= Request.Form("indirizzo")
    othercitta					= Request.Form("othercitta")
    otherstato					= Request.Form("otherstato")
    othercap					= Request.Form("othercap")
    otherselezionenazione		= Request.Form("otherselezionenazione")
    othertelefono			    = Request.Form("othertelefono")
    
    tipopagamento				= Request.Form("tipopagamento")
    infospedizione				= Request.Form("infospedizione")
    selezionegift				= Request.Form("selezionegift")
    notegift  				    = Request.Form("notegift")
    selectinvoice				= Request.Form("selectinvoice")
    vatpiva				        = Request.Form("vatpiva")
    
    iagree						= Request.Form("iagree")
    privacy					    = Request.Form("privacy")
    
    
    
    
    	'*rilevo i campi del form
    	
    FOR numeroCampi = 1 TO (Request.Form.Count() - 1)
       IF NOT Request.Form(numeroCampi) = "" THEN
          corpoMessaggio = corpoMessaggio & vbCrLf & Request.Form.Key(numeroCampi) & " = " & Trim(Request.Form(numeroCampi))
       END IF
    NEXT
    
    	'* creo gli oggetti cdosys sul server e li gestisco
    	
    DIM iMsg, Flds, iConf
    
    Set iMsg = CreateObject("CDO.Message")
    Set iConf = CreateObject("CDO.Configuration")
    Set Flds = iConf.Fields
    
    Flds(cdoSendUsingMethod) = cdoSendUsingPort
    Flds(cdoSMTPServer) = "smtp.aruba.it" 
    Flds(cdoSMTPServerPort) = 25
    Flds(cdoSMTPAuthenticate) = cdoAnonymous ' 0
    Flds.Update
    
    With iMsg
       Set .Configuration = iConf
       .To = invioA
       .From = Request.Form("email")
       .Sender = invioDa
       .Subject = "Ultimate Rolex Daytona - " & "Paypal"
       txt = "Ultimate Rolex Daytona - Paypal" & ":"& "" & vbCrLf & vbCrLf &_
    "First Name: " & firstname & vbCrLf &_
    "Last Name: " & lastname & vbCrLf &_
    "Company: " & company2 & vbCrLf &_
    "Email: " & email2 & vbCrLf &_
    "Address: " & indirizzo & vbCrLf &_
    "City: " & citta & vbCrLf &_
    "State: " & stato & vbCrLf &_
    "Cap: " & cap & vbCrLf &_
    "Country " & selezionenazione & vbCrLf &_
    "Phone: " & telefono & vbCrLf &_
    "Cod Fisc: " & codfisc & vbCrLf &_
    "Shipping Address: " & "" & vbCrLf &_
    "First Name: " & otherfirstname & vbCrLf &_
    "Last Name: " & otherlastname & vbCrLf &_
    "Company: " & othercompany2 & vbCrLf &_
    "Email: " & otheremail2 & vbCrLf &_
    "Address: " & otherindirizzo & vbCrLf &_
    "City: " & othercitta & vbCrLf &_
    "State: " & otherstato & vbCrLf &_
    "Cap: " & othercap & vbCrLf & "" &_
    "Country " & otherselezionenazione &_
    "Phone: " & othertelefono & vbCrLf &_
    "Payment Method: " & tipopagamento & vbCrLf &_
    "Special Delivery Instruction: " & infospedizione & vbCrLf &_
    "It's a Gift: " & selezionegift & vbCrLf &_
    "Note Gift: " & notegift & vbCrLf &_
    "Invoice: " & selectinvoice & vbCrLf &_
    "VAT / p.IVA: " & vatpiva & vbCrLf &_
    "I agree: " & iagree & vbCrLf &_
    "Privacy: " & privacy & vbCrLf
    .TextBody = txt
    .Send
    End With
    
    Response.Redirect "response_cheque.asp"
    
    %>

  8. #8
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Se metti manualmente

    .TextBody = "Pippo Pippo"

    ti funziona?

    Roby

  9. #9
    Utente di HTML.it L'avatar di naps
    Registrato dal
    May 2001
    Messaggi
    465
    no, neanche con : .TextBody = "Pippo Pippo"

  10. #10
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Allora il problema è a monte...

    Roby

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.