Visualizzazione dei risultati da 1 a 6 su 6

Discussione: Modulo con CDOSYS

  1. #1

    Modulo con CDOSYS

    Ciao a tutti ho scaricato il Modulo con CDOSYS, pero' non so come configurarlo. Visto che mi sono appena avvicinato a ASP, qualcuno più esperto puo' darmi una mano? Grazie.
    Questa è (credo) la pagina da configurare.

    [code]<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

    <%

    'First lets Dim all the variables we need



    Dim email

    Dim name

    Dim company

    Dim telephone

    Dim address1

    Dim city

    Dim state

    Dim zip

    Dim users

    Dim app_name

    Dim decision_time

    Dim OS

    Dim bandwidth

    Dim DedicatedFirewall

    Dim TapeBackup

    Dim special_details

    Dim MyBody

    Dim MyMail

    Dim MyEmail

    Dim SmtpMail



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

    smtpserver = "mail.ADDSERVERNAME.com"

    youremail = "ADDYOUREMAILADDRESS"

    yourpassword = "ADDYOURPASSWORD"

    email = Request.Form("email")

    name = Request.Form("name")

    company = Request.Form("company")

    telephone = Request.Form("telephone")

    address = Request.Form("address")

    city = Request.Form("city")

    state = Request.Form("state")

    zip = Request.Form("zip")

    users = Request.Form("users")

    app_name = Request.Form("app_name")

    decision_time = Request.Form("decision_time")

    OS = Request.Form("OS")

    bandwidth = Request.Form("bandwidth")

    DedicatedFirewall = Request.Form("DedicatedFirewall")

    TapeBackup = Request.Form("TapeBackup")

    special_details = Request.Form("special_details")



    '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 & "Company: "& company & Chr(13) & vbcrlf & "
    "

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

    MyBody = MyBody & "Email: "& email & vbcrlf & "
    "

    MyBody = MyBody & "Telephone: "& telephone & vbcrlf & vbcrlf & "
    "

    MyBody = MyBody & "Address: "& address & vbcrlf & "
    "

    MyBody = MyBody & "City: "& city & vbcrlf & "
    "

    MyBody = MyBody & "State: "& state & vbcrlf & vbcrlf & "
    "

    MyBody = MyBody & "Zip: "& zip & vbcrlf & vbcrlf & "
    "

    MyBody = MyBody & "Application: "& app_name & vbcrlf & vbcrlf & "
    "

    MyBody = MyBody & "Decision Timeframe: "& decision_time & vbcrlf & vbcrlf & "
    "

    MyBody = MyBody & "Operating System: "& OS & vbcrlf & vbcrlf & "
    "

    MyBody = MyBody & "Monthly Bandwidth Estimate: "& bandwidth & vbcrlf & vbcrlf & "
    "

    MyBody = MyBody & "Dedicated Firewall: "& DedicatedFirewall & vbcrlf & vbcrlf & "
    "

    MyBody = MyBody & "Tape Backup: "& TapeBackup & vbcrlf & vbcrlf & "
    "

    MyBody = MyBody & "Comments:" & vbcrlf & "
    "

    MyBody = MyBody & special_details



    '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") = 2 'Send the message using the network (SMTP over the network).

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

    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") = youremail

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



    ObjSendMail.Configuration.Fields.Update



    'End remote SMTP server configuration section==



    ObjSendMail.To = youremail

    ObjSendMail.Subject = company

    ObjSendMail.From = email



    ' 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>
    [code]

  2. #2
    Fermo restando che tu abbia fatto già il modulo di inserimento dati, devi modificare queste righe:
    smtpserver = "mail.ADDSERVERNAME.com"

    youremail = "ADDYOUREMAILADDRESS"

    yourpassword = "ADDYOURPASSWORD"


    Supponendo che il tuo server sia A...a.it dovrai scrivere:
    smtpserver = "mail.A...a.it"

    nella seconda riga metti l'indirizzo email al quale vuoi far arrivare l'email
    youremail = "webmaster@tuosito.it"

    Infine la tua password
    yourpassword = "pincopallino23"


  3. #3
    Grazie per le info. Avrei una sola altra domanda da porre. Se il server che ospita il mio sito non dovesse supportare ASP, la pagina la vedo lo stesso? Oppure non me la carica? Oppure vedo il codice della pagina ASP?

    Grazie

  4. #4

  5. #5
    Visto che mi sono appena avvicinato a ASP
    che significa vedi il codice?

  6. #6
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Originariamente inviato da forumauro
    Oppure vedo il codice della pagina ASP?
    Questo!

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