Ciao a tutti, ho un problema di formattazione della mail che viene inviata come riepilogo dell'ordine effettuato.
l'utente sceglie gli articoli, va nel carrello, compila il form e poi clicca su invia l'ordine.
ora la pagina send.asp si occupa della creazione della mail e della spedizione.
cosi' viene creato l'ordine con il contenuto del carrello:
cosi' creo la mail:codice:i = session("items") mailText = mailText & chr(13) & chr(10) & chr(13) & chr(10) mailText = mailText & orderPerson & chr(13) & chr(10) mailtext = mailText & "----------------------------------------" & chr(13) & chr(10) for t = o to i if (warenkorb(t,0)) <> "" then gesamt_artikel = + warenkorb(t,0) * warenkorb(t,2) gesamt = FormatNumber(gesamt + gesamt_artikel,2,,-2) mailText = mailText & l_list1 & " : " & warenkorb(t,0) & chr(13)& chr(10) mailText = mailText & l_list2 & " : " & warenkorb(t,3) & chr(13)& chr(10) mailText = mailText & l_list3 & " : " & warenkorb(t,4) & chr(13)& chr(10) mailText = mailText & l_list4 & " : " & FormatNumber(warenkorb(t,2),2,,-2) & chr(13)& chr(10) mailtext = mailtext & l_list5 & " : " & FormatNumber(gesamt_artikel,2,,-2)& chr(13) & chr(10) mailtext = mailText & "----------------------------------------" & chr(13) & chr(10) end if next mailtext = mailText & "========================================" & chr(13) & chr(10) mailtext = mailtext & l_list6 & " : " & FormatNumber(gesamt,2,,-2)
il mio problema e' che formattando la mail in HTML, (vedi Mailer.MailFormat = 0codice:'create an instance of the CDONTS object Set Mailer = CreateObject("CDONTS.NewMail") html = html & "<html><head>" html = html & "<title>Nextshop ordine online</title>" html = html & "</head>" html = html & "<body bgcolor=""#FFFFFF"">" html = html &"<center> " html = html & "[img][/img]" html = html &"</center> " html = html &"<left>" html = html & mailText html = html &"</left> " html = html &"<center> " html = html & "<a href=""http://www.nextart.it/shop"">" html = html & "Torna a visitarci</a> " html = html & "presto " html = html & "</center>" html = html & "</body>" html = html & "</html>" ' 0 = html 1 = ascii Mailer.MailFormat = 0 Mailer.BodyFormat = 0 Mailer.From = mail_sender Mailer.To = checkField(request.form("m_mailadress")) Mailer.Bcc = mail_empfaenger Mailer.Subject = mail_subject Mailer.Body = html Mailer.Send Set Mailer= Nothing end if end if
Mailer.BodyFormat = 0) , la parte degli articoli ordinati non viene formattata correttamente
non tenendo conto dei & chr(13)& chr(10) che dovrebebro dire vai a capo.
cosi':
Ordine online effettuato presso NEXT_SHOP di ........ Nome: q Città: q Via: q Stato: q Telefono: q Indirizzo E-Mail: domini@nextart.it Commenti: 11111111111 ---------------------------------------- Quantità : 1 Codice : 00004 Articolo : NEXT_ PHOTO Prezzo unitario : 0,00 Prezzo : 0,00 ---------------------------------------- =Totale: : 0,00
al contrario se imposto Mailer.MailFormat = 1 Mailer.BodyFormat = 1 la formattazione dell'ordine e' corretta, ma ovviamente non posso inserire il logo o altri elementi html.
come avere la mail in formato html e l'ordine formatatto correttamente?
grazie....
![]()

Rispondi quotando