Visualizzazione dei risultati da 1 a 4 su 4

Discussione: Allegati con mail asp

  1. #1

    Allegati con mail asp

    Salve
    avrei bisogno di sapere se è possibile allegare file ad una mail asp.

    ed in particolare se è possibile allegare un file mdb


    Grazie in anticipo
    E' il cervello che ci rende folli o deliranti, che ci ispira terrori e paure, che, ci fa compiere errori sconsiderati, ci rende ansiosi senza scopo,ci rende inconsapevoli......

  2. #2

    Re: Allegati con mail asp

    Originariamente inviato da BlackLabel
    Salve
    avrei bisogno di sapere se è possibile allegare file ad una mail asp.

    ed in particolare se è possibile allegare un file mdb


    Grazie in anticipo
    Sì, è possibile.
    Il file però deve risiedere fisicamente sul server per poter essere allegato all'email.

  3. #3
    certo certo
    grazie mille
    E' il cervello che ci rende folli o deliranti, che ci ispira terrori e paure, che, ci fa compiere errori sconsiderati, ci rende ansiosi senza scopo,ci rende inconsapevoli......

  4. #4
    Utente di HTML.it L'avatar di morphy79
    Registrato dal
    Jun 2004
    Messaggi
    1,568
    Questo sarebbe il codice con l'oggetto Dundas.Mailer

    codice:
    <%
    Set objEmail = Server.CreateObject("Dundas.Mailer") 'Mailer object
    
    allegatoPath = Server.MapPath(".") & "\readme.txt"
    
    'add an Address object to the TOs collection (this specifies the destination address)
    objEmail.TOs.Add "m.rossi@libero.it"
    
    'specify the message subject
    objEmail.Subject = "Some Subject"
    
    'specify an SMTP server. Doing this increases the speed and reliability of the mail operation
    objEMail.SMTPRelayServers.Add "smtp.provider.it"
    
    'set the message body
    objEmail.Body = "This is the message body"
    
    objEmail.Attachments.Add allegatoPath
    
    'now send the email
    objEmail.SendMail
    
    'test for success/failure of the SendMail operation using VBScript's Err object
    If Err.Number <> 0 Then 
    'an error occurred so output the relevant error string
    Response.Write "The following error occurred: " & Err.Description
    Else
    'successful, so output a success message to user
    Response.Write "The email was successfully forwarded to the specified SMTP server."
    End If
    
    Set objEmail = Nothing 'release resources
    Set objUpload = Nothing
    %>

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.