9 messaggi dal 28 settembre 2007
ciao ... scusate la domanda ( magari stupida ) non esiste un modo per inviare una pagina asp direttamente con CDONTS ??? devo inviare delle email dal server vorrei creare una pagina in html un pò bellina .... mi sono siegato ???
grazie
Certo, puoi inviare un messaggio email in html impostando la proprietà bodyformat a 0 (http://msdn2.microsoft.com/en-us/library/ms526401(EXCHG.10).aspx)
e preparando il testo del messaggio in questo modo:

html = "<html>"
html = html & "<head><title>Contatto dal sito internet</title>"
html = html & "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'></head>"
html = html & "<body bgcolor='#FFFFFF' text='#000000'>"
html = html & "<p>"
html = html & "Messaggio inviato da :<br><br>"
html = html & "Nome : <b>" &nome& "</b><br>"
html = html & "Città : <b>" &azienda& "</b><br>"
...


e quindi:

set objmail = server.createobject("CDONTS.newmail")
objmail.from = email
objmail.to = email_azienda
objmail.subject ="Contatto dal sito internet"
objmail.body = html
objmail.bodyformat = 0
objmail.mailformat   = 0

Alessio Leoncini (SilverlightItalia.com)
.NET Developer, Interactive Designer, UX Specialist, Trainer @ 5DLabs.it
9 messaggi dal 28 settembre 2007
certo ... quello che cercavo era uno script che prendesse la pagina asp bella e fatta e la trasformasse in una stringa di testo già formattata a dovere ... con le doppie virgolette o gli apici ... con il percorso completo delle immagini ... ecc..
Ho trovato questo..
Sending an HTML e-mail that sends a webpage from a website:

<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To="someone@somedomain.com"
myMail.CreateMHTMLBody "http://www.w3schools.com/asp/"
myMail.Send
set myMail=nothing
%>

Sending an HTML e-mail that sends a webpage from a file on your computer:

<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To="someone@somedomain.com"
myMail.CreateMHTMLBody "file://c:/mydocuments/test.htm"
myMail.Send
set myMail=nothing
%>

MI RACCOMANDO VISITATE IL MIO SITO! GRAZIE! :)
http://www.ricarichestampanti.it/ e http://www.carrestyling.com/
E come editor di testo ricordate esiste Edit Plus 2!
http://www.editplus.com

Torna al forum | Feed RSS

ASPItalia.com non è responsabile per il contenuto dei messaggi presenti su questo servizio, non avendo nessun controllo sui messaggi postati nei propri forum, che rappresentano l'espressione del pensiero degli autori.