ho un form con dei campi da compilare da parte dell'utente, al termine della compilazione e con l'invio dei dati l'utente riceve una email di conferma con i dati che ha inserito e nell'email si dovrebbe visualizzare lo sfondo, ma con outlook non lo fa!
ecco il codice:
Dim cognome
Dim nome
Dim data
Dim giorno
Dim mese
Dim anno
Dim citta
Dim cap
Dim provincia
Dim via
Dim cell
Dim email
Dim MyBody
Dim MyMail
Dim MyEmail
Dim SmtpMail
'Now lets get some values for the variables from the form
smtpserver = "mail.nomesito.it"
subject = "Registrazione"
youremail = "registrazione@nomesito.it"
yourpassword = "55555555"
cognome = Request.Form("cognome")
nome = Request.Form("nome")
data = Request.Form("data")
giorno = Request.Form("giorno")
mese = Request.Form("mese")
anno = Request.Form("anno")
citta = Request.Form("citta")
cap = Request.Form("cap")
provincia = Request.Form("provincia")
via = Request.Form("via")
cell = Request.Form("cell")
email = Request.Form("email")
'Now lets build the body of the email from the data in the form
MyBody = "<p><font face=Arial size=1>" & Chr(13) & vbcrlf
MyBody = MyBody & "<table height=""330"" border=""0"" cellpadding=""5"" cellspacing=""0""><tr><td background=""http://www.nomesito.it/immagini/ESITO_EMAIL.jpg"" width=""770"">"
MyBody = MyBody & "<table width=""770"" height=""330"" border=""0"" cellpadding=""5"" cellspacing=""0""><tr><td></td><td height=""80""></td></tr>"
MyBody = MyBody & "<tr><td width=""487""></td><td width=""273"" valign=""top"">"
MyBody = MyBody & "<b>Cognome:</b> "& cognome & Chr(13) & vbcrlf & "<br>"
MyBody = MyBody & "<b>Nome:</b> "& nome & Chr(13) & vbcrlf & "<br>"
MyBody = MyBody & "<b>Data di nascita:</b> "& giorno & " " & mese & " " & anno & " " & vbcrlf & "<br>"
MyBody = MyBody & "<b>Residente in:</b> "& citta & vbcrlf & vbcrlf & "<br>"
MyBody = MyBody & "<b>Cap:</b> "& cap & vbcrlf & "<br>"
MyBody = MyBody & "<b>Provincia:</b> "& provincia & vbcrlf & vbcrlf & "<br>"
MyBody = MyBody & "<b>Indirizzo:</b> "& via & vbcrlf & vbcrlf & "<br>"
MyBody = MyBody & "<b>Cellulare:</b> "& cell & vbcrlf & vbcrlf & "<br>"
MyBody = MyBody & "<b>Email:</b> "& email & vbcrlf & vbcrlf & "<br>"
MyBody = MyBody & "</td></tr></table>"
MyBody = MyBody & "</td></tr></table>"
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.cc = email
ObjSendMail.Subject = subject
ObjSendMail.From = email
' we are sending a html email.. simply switch the comments around to send a text email instead
ObjSendMail.HTMLBody = MyBody
ObjSendMail.Send
Set ObjSendMail = Nothing
ricevo l'email con la formattazione giusta,lo sfondo non si vede solo su outlook, invece se guardo l'email dal web si vede lo sfondo!
dov'è l'errore?
Grazie