Visualizzazione dei risultati da 1 a 7 su 7
  1. #1

    Asp Smart Mail e Access

    Ho cambiato hosting e questo ha Smart Mail.
    Come si fa ad inserire negli indirizzi di invio dati provenienti da un DB Access ?

  2. #2
    Prima di cambiare hosting come facevi?

  3. #3
    Utilizzavo cdonts, e Asp Smart Mail sono riuscito a configurarlo per ricevere e inviare mail direttamente. ma non utilizzando un db.
    Il problema è che non mi estrae gli indirizzi dal db.

    Mi dà questo errore (questo è un test con indirizzi interni):

    Error n° 40 = Error when check Recipient address : 452 4.2.2 Mailbox full
    1 E-mail :
    peronetto@libero.it

    Error n° 40 = Error when check Recipient address : 452 4.2.2 Mailbox full
    2 E-mail :
    webmaster@docvideo.it

    Error n° 40 = Error when check Recipient address : 452 4.2.2 Mailbox full
    3 E-mail :
    silvia.taborelli@docvideo.it

    Error n° 40 = Error when check Recipient address : 452 4.2.2 Mailbox full

  4. #4
    A me sembra che gli indirizzi te li estragga.
    L'errore dice che i destinatari hanno la casella di posta piena.

  5. #5
    Ma in realtà non è così, poichè sono indirizzi interni che mi servono da test, e le caselle non sono piene....

  6. #6
    Vediamo il codice intero della tua pagina che legge gli indirizzi dal db e invia le email.

  7. #7


    <%Server.ScriptTimeout = 200%>
    <%
    '################################################# ############################################
    '####
    '#### Script : Mailing List V.1.0
    '####
    '#### Copyright (C) 2002 Roberto Gallo Marchiando
    '####
    '#### Authore: Roberto Gallo Marchiando
    '#### E-mail: webmaster@freepuntonet.com
    '#### Web: http:www.freepuntonet.com
    '#### Date: 19/05/2002
    '#### Linguaggio : ASP (vbscript)
    '#### Licenza: Script di libero utilizzo e può essere distribuito liberamente.
    '#### A patto che queste linee di testo restino intatte.
    '####
    ''#### Per problemi rigurdanti lo script contattare:
    '#### webmaster@freepuntonet.com
    '####
    '################################################# #############################################
    '
    'ooooooooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooo
    'ooooooooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooo
    'oooo
    'oooo Modifica allo Script : Mailing List V.1.0
    'oooo
    'oooo Autore: Fulvio Danese
    'oooo E-mail: fulviolo58@yahoo.it - webmaster@100vetrine.net
    'oooo Web: www.100vetrine.net
    'oooo Date: 21-10-2003
    'oooo Linguaggio : ASP (vbscript)
    'oooo
    'oooo Modifiche apportate ai seguenti file:
    'oooo - Admin_Anteprima_News.asp
    'oooo - Admin_Modifica_News.asp
    'oooo - Admin_Nuova_News.asp
    'oooo - Conn.asp
    'oooo - Istruzioni.asp (nuovo file inserito nella cartella Admin).
    'oooo - Mail.asp
    'oooo - Mailing.asp
    'oooo - Unsubscribe.asp (nuovo file inserito nella root).
    'oooo
    'oooo Scopo delle modifiche:
    'oooo - Aggiunta funzione per inserimento news in formato HTML e puro URL.
    'oooo - Anteprima news in tutti i formati.
    'oooo - Selezione automatica del formato in fase di invio.
    'oooo - Istruzioni per l inserimento news nei vari formati.
    'oooo - invio delle news con l'oggetto CDOSYS.
    'oooo
    'ooooooooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooo
    'ooooooooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooo
    '
    '###### LA SESSIONE RESTA CRIPTATA NON MODIFICARE QUESTI DATI ( "óåóóéïîåßÕôåîôåßóéãõòá" )
    If Session("SecurityID") <> "óåóóéïîåßÕôåîôåßóéãõòá" Then
    Response.Redirect "index.asp"
    End If

    '################################################# #########################################


    News = request.querystring("IDNews")

    set rst = conn.Execute("SELECT * From News Where ID=" & News )
    Titolo = rst("News_Titolo")
    strMessage =rst("News_testo")

    Dim tipo
    tipo = Trim(strMessage)
    tipo = left(tipo, 6)
    tipo = (lcase(tipo))

    if Tipo = "<html>" then
    Tipo = "HTML"
    elseif Tipo = "http:/" then
    Tipo = "URL"
    else
    Tipo = "TEXT"
    end if

    %>

    <html>
    <head>
    <title>Test Mailing List </title>
    </head>
    <body>
    <div align="center">
    <center>
    <table border="0" width="642" cellspacing="0" cellpadding="0">
    <tr>
    <td bgcolor="#FFFFFF" width="640">
    <p align="center"><font color="#4B96D3" face="Arial" size="2">

    </font><font color="#4B96D3" size="5" face="Arial"> Mailinglist

    <%
    If DatabaseEsterno = True then

    Response.Write "<font size='4' color='red' align='center'>"
    Response.Write "QUESTO E' IL TUO DATABASE ESTERNO
    </font>
    "

    Else

    Response.Write "<font size='4' color='red' align='center'>"
    Response.Write "DATABASE INTERNO DELLO SCRIPT
    </font>
    "


    End IF
    %>
    </font><font face="Arial" size="2" color="#800000">Continuare l'invio
    della News cliccando <font size="2">Avanti</font><font color="#4B96D3" size="5" face="Arial">

    </font></font>
    </p>
    </td>
    </tr>
    </table>
    </center>
    </div>
    <div align="center">
    <center>
    <table cellspacing="1" border="0" width="453" bgcolor="#4B96D3" height="1">
    <%

    '::::::::::::::::::::: iPagesize viene preso dal valore che hai selezionato dalla configurazione

    recordsonpage = paginerecord

    allrecords = 0


    If DatabaseEsterno = True then
    set rs = conn2.Execute("SELECT * From " & TabellaPrimaria & " where " & CellaEmail & "")
    else
    set rs = conn.Execute("SELECT * From Mailing where email ")
    End IF

    If RS.EOF Then

    Response.Write "<div align='center'>"
    Response.Write "<center><table cellspacing=1 cellpadding=4 border=0 width=367>"
    Response.Write "<td width='353'>"
    Response.Write "<p align='center'><font size='4' color='red' align='center'>"
    Response.Write "Non sono iscritti alla Mailling List
    </font></table></center></div>"

    Else

    do until rs.EOF
    allrecords = allrecords + 1
    rs.movenext
    loop

    offset = request.querystring("offset")
    if offset = 0 OR offset = "" then
    requestrecords = 0
    else
    requestrecords = requestrecords + offset
    end if

    If DatabaseEsterno = True then
    set rs = conn2.Execute("SELECT * From " & TabellaPrimaria & " where " & CellaEmail & "")
    else
    set rs = conn.Execute("SELECT * From Mailing where email ")
    End IF

    hiddenrecords = requestrecords
    do until hiddenrecords = 0 OR rs.EOF
    hiddenrecords = hiddenrecords - 1
    rs.movenext
    if rs.EOF then
    lastrecord = 1
    end if
    loop
    showrecords = recordsonpage
    recordcounter = requestrecords
    do until showrecords = 0 OR rs.EOF
    recordcounter = recordcounter + 1

    '::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::
    ': E-mail :
    '::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::

    on error resume next


    If DatabaseEsterno = True then
    email = rs.Fields(CellaEmail)
    Else
    email = rs.Fields("email")
    End if

    If DatabaseEsterno = True then

    Body = "By " & Organizzazione & vbCrlf
    Body = Body &"WebSite " & Live_server

    Else

    if Tipo = "TEXT" then
    Body = "Ricevi questa News perche sei iscritto alla Mailing List di "& Live_server & vbCrlf
    Body = Body &"---------------------------------------------------------------------------------" & vbCrlf
    Body = Body &"Se ti vuoi rimuovere dalla Mailing List clicca il collegamento sotto grazie "& vbCrlf
    Body = Body &"Link : " & ServerURL &"mail.asp?action=cancellami&nome=No&email="&rs.Fi elds("email") & vbCrlf
    Body = Body &"---------------------------------------------------------------------------------" & vbCrlf & vbCrlf
    Body = Body &"By " & Organizzazione & vbCrlf
    Body = Body &"WebSite " & Live_server
    End if

    if Tipo = "HTML" then
    Body = "


    <center>-----------------------------------------------------------------------------------------------------------------------------
    Ricevi questa News perche sei iscritto alla Mailing List di "& Organizzazione & vbCrlf
    Body = Body &"
    cancellami dalla mailing list!"
    Body = Body &"
    ---------------------------------------------------------------------------------" & vbCrlf & vbCrlf
    Body = Body &"
    By " & Organizzazione & vbCrlf
    Body = Body &"
    WebSite " & "<a href=response.write(Live_server)>" & Live_server & "</p>"
    End if

    End if

    ' invio mail con AspSmartMail
    On error resume next

    Dim mySmartMail
    Set mySmartMail = Server.CreateObject("aspSmartMail.SmartMail")
    mySmartMail.SenderAddress = "info@docvideo.it"

    If DatabaseEsterno = True then
    mySmartMail.Recipients.Add "CellaEmail"
    mySmartMail.Subject = "Titolo"
    mySmartMail.Body = "strMessage & vbCrlf & vbCrlf & Body"
    else
    mySmartMail.Recipients.Add "email"
    mySmartMail.Subject = "Titolo "
    mySmartMail.Body = "strMessage & vbCrlf & vbCrlf & Body"
    end if

    mySmartMail.SendMail

    if err.number <> 0 then

    response.write("Error n° " & err.number - vbobjecterror & " = " & err.description & "
    ")

    else

    Response.Write "aspSmartMail has sent your message with this file as attachment :
    "
    Response.Write mySmartMail.Attachments.Item(1).FilePathName

    end if

    set mySmartMail = nothing

    ' invio mail con l oggetto CDOSYS
    'Dim conf 'As CDO.Configuration
    'Const NAMESPACE = "http://schemas.microsoft.com/cdo/configuration/"
    'Set mail = CreateObject("CDO.Message")
    'Set conf = CreateObject("CDO.Configuration")
    'conf.Fields(NAMESPACE & "sendusing") = 2
    'conf.Fields(NAMESPACE & "smtpserver") = "localhost"
    'conf.Fields(NAMESPACE & "smtpserverport") = 25
    'conf.Fields.Update
    'mail.Configuration = conf
    'if Tipo = "URL" then
    'strMessage = trim(strMessage)
    ' Const cdoSendUsingPort = 2
    ' mail.from = Email_Mailing
    ' If DatabaseEsterno = True then
    ' mail.To = rs.Fields(CellaEmail)
    ' mail.Subject = Titolo
    'mySmartMail.Body =
    'else
    ' mail.To = rs.Fields("email")
    'mail.Subject = Titolo
    'mail.CreateMHTMLBody(strMessage)
    'end if
    'set Mail=nothing
    'end if


    'if Tipo = "HTML" then
    ' With Mail
    ' .From = Email_Mailing
    ' If DatabaseEsterno = True then
    ' .To = rs.Fields(CellaEmail)
    ' .Subject = Titolo
    '.HTMLBody = strMessage & vbCrlf & vbCrlf & Body
    '.Send
    'else
    '.To = rs.Fields("email")
    '.Subject = Titolo
    '.HTMLBody = strMessage & vbCrlf & vbCrlf & Body
    '.Send
    'end if
    'end With
    'set Mail=nothing
    'End if

    'if Tipo = "TEXT" then
    ' With Mail
    ' .From = Email_Mailing
    ' If DatabaseEsterno = True then
    ' .To = rs.Fields(CellaEmail)
    ' .Subject = Titolo
    ' .TEXTBody = strMessage & vbCrlf & vbCrlf & Body
    '.Send
    'else
    '.To = rs.Fields("email")
    '.Subject = Titolo
    '.TEXTBody = strMessage & vbCrlf & vbCrlf & Body
    '.Send
    'end if
    'end With
    'set Mail=nothing
    'End if

    ' invio mail con l oggetto CDONTS
    'Set Mail = Server.CreateObject("CDONTS.NewMail")
    'Mail.MailFormat = html
    'Mail.BodyFormat = 1
    'Mail.from = Email_Mailing

    'If DatabaseEsterno = True then
    'Mail.to = rs.Fields(CellaEmail)
    'Mail.Subject = Titolo
    'Mail.Body = strMessage & vbCrlf & vbCrlf & Body
    'Mail.Send
    'Else
    'Mail.to = rs.Fields("email")
    'Mail.Subject = Titolo
    'Mail.Body = strMessage & vbCrlf & vbCrlf & Body
    'Mail.Send
    'End if
    %>
    <tr><td width="679" bgcolor="#FFFFFF" height="1">
    <div align="center">
    <center>
    <table border="0" width="497" cellspacing="0" bgcolor="#C1E3BF" height="1">
    <tr>
    <td width="22" bgcolor="#EDF8FE" height="1"><font size="2" face="Arial"><% = recordcounter %></font></td>
    </center>
    </center>
    <td bgcolor="#F9FDFF" height="1" align="right" width="49">
    <p align="right"><font size="2" face="Arial">E-mail :</font></p>
    </td>
    <center>
    <td width="414" bgcolor="#F9FDFF" height="1">
    <font size="2" face="Arial"> <font color="#800000">
    <% If DatabaseEsterno = True then %>
    <%=rs(CellaEmail)%>
    <%Else%>
    <%=rs("Email")%>
    <%End if %>
    </font></font></td>
    </tr>
    </center>
    <center>
    </center>
    </table>
    </div>
    </td>
    </tr>
    <center>
    <%
    showrecords = showrecords - 1
    rs.movenext
    if rs.EOF then
    lastrecord = 1
    end if
    loop
    %>
    </table>
    </center>
    </div>
    <p align="center">
    <div align="center">
    <table cellspacing="0" cellpadding="2" border="0" width="756">
    <tr>
    <td width="374">
    <p align="right"><font size="2" face="Arial"><% if requestrecords <> 0 then %>
    Indietro<% else %>Indietro<% end if %>
    </font></p>
    </td>
    <center>
    <td width="362"><font size="2" face="Arial"><% if lastrecord <> 1 then %> Avanti
    <% else %>Avanti<% end if %>
    </font></td>
    </tr>
    <tr>
    <td width="736" colspan="2">
    <p align="center">
    </td>
    </tr>
    <tr>
    <td colspan="2" width="744">
    <p align="center">
    <%
    if lastrecord <> 0 then
    Response.write"


    <font face=""Arial"" size=""5"" color=""#4B96D3"">Mailing List Completata</font>"
    Response.write"

    <a href=""index3.asp""><font face=""Arial"" size=""4"">..:: Index ::..</font>"
    else
    %>
    </p>
    </td>
    </tr>
    </table>
    </center>
    </div>
    <%
    end if
    end if

    ':::::::::::::::::::::::::::::::: Chiusura connessione e oggetti

    rs.close
    set rs = nothing
    conn2.close
    Set conn2 = nothing
    Conn.close
    set Conn = nothing
    %>


    </p>
    </body>
    </html>

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.