Pagina 1 di 3 1 2 3 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 25

Discussione: cdosys - problema

  1. #1

    cdosys - problema

    Ciao a tutti gli accatiemmelliani e non!

    ho questo problema con un form in asp per l'invio di mail da sito. Premendo "send" il browser mi riporta il seguente errore:


    Microsoft VBScript compilation error '800a0401'

    Expected end of statement

    /testsito/folder/folder/invio.asp, line 19

    Dim email address
    ----------^


    Chevvordì? :master:
    cosa manca alla linea 19 del doc asp? Grazie infinite a chi mi darà una mano!!!

  2. #2
    Nei nomi delle variabili non è consentito l'uso di spazi. Prova a mettere fra email e address un _ (underscore)


  3. #3
    Originariamente inviato da 16jump25
    Nei nomi delle variabili non è consentito l'uso di spazi. Prova a mettere fra email e address un _ (underscore)

    Che celere! Provo quasi subito, grazie!

  4. #4
    Originariamente inviato da 16jump25
    Nei nomi delle variabili non è consentito l'uso di spazi. Prova a mettere fra email e address un _ (underscore)

    Credo non sia l'unico problema

    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") =

    mi segnala pure questo. Che user e pass bisogna mettere qui? grazie veramente

  5. #5
    puoi far vedere tutto il listato ?

  6. #6
    posto l'intero codice asp, magari potete trovare l'inghippo. Grazie ancora!




    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

    <%

    'First lets Dim all the variables we need





    Dim name

    Dim surname

    Dim country

    Dim mail_address

    Dim MyBody

    Dim MyMail

    Dim MyEmail

    Dim SmtpMail



    'Now lets get some values for the variables from the form

    smtpserver = "mail.aruba.it"

    youremail = "mailallaqualemandareilmessaggio@sito.com"

    yourpassword = "pass"

    email = Request.Form("name")

    name = Request.Form("surname")

    company = Request.Form("country")

    telephone = Request.Form("mail_address")





    'Now lets build the body of the email from the data in the form

    MyBody = "

    <font face=Arial size=2>" & Chr(13) & vbcrlf



    MyBody = MyBody & "name: "& Name & Chr(13) & vbcrlf & "
    "

    MyBody = MyBody & "surname: "& surname & vbcrlf & "
    "

    MyBody = MyBody & "country: "& country & vbcrlf & "
    "

    MyBody = MyBody & "mail_address: "& mail_adress & vbcrlf & "
    "





    'Now lets put the variables and other information we need into the mailing script

    Dim ObjSendMail

    Set ObjSendMail = CreateObject("CDO.Message")



    'This section provides the configuration information for the remote SMTP server.



    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1 'Send the message using the network (SMTP over the network).

    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtp.aruba.it

    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False)

    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60



    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication

    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = user@aruba.it

    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = pass



    ObjSendMail.Configuration.Fields.Update



    'End remote SMTP server configuration section==



    ObjSendMail.To = mailallaqualemandareilmessaggio@sito.com

    ObjSendMail.Subject = message from nomesito.com

    ObjSendMail.From = mailallaqualemandareilmessaggio@sito.com



    ' we are sending a html email.. simply switch the comments around to send a text email instead

    ObjSendMail.HTMLBody = MyBody

    'ObjSendMail.TextBody = MyBody



    ObjSendMail.Send



    Set ObjSendMail = Nothing

    %>

    <font size="2">Your message as seen below has been sent. Thank You !!






    <font color="blue">

    <% =Replace(MyBody,vbCr,"<font face=Arial size=2>") %>

    </font>

  7. #7
    Dovresti mettere fra apici quello che invii :
    codice:
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "user@aruba.it"

  8. #8
    Ma, io tutte le variabili del server le toglierei e lascerei che se le gestisse in automatico.

    E poi, quello non è lo script che aruba consiglia per l'invio della mail "credo" dove lo hai preso ?

  9. #9
    l'ho pescato altrove. Intanto provo a fare come dite voi.

  10. #10
    credo di aver commesso degli errori, molti! :master:

    ObjSendMail.To =

    ObjSendMail.Subject = message from sito.com

    ObjSendMail.From = mail del sito@sito.com


    Cosa devo dichiarare dopo: ObjSendMail.To =

    Le altre due righe vanno bene? Grazie ancora del supporto!

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 © 2026 vBulletin Solutions, Inc. All rights reserved.