23. december 2005 - 12:54Der er
12 kommentarer og 1 løsning
Formater tekst i smtpmail
Jeg har flg. kode som sender en mail, men hvordan får jeg f.eks. linie 2 ("nr") til at være fed i mailen. <% Dim CR Dim MyBody Dim MyCDONTSMail CR = Chr(9) & Chr(10)
if not Mailer.SendMail then Response.Write " Mailing Failed... Error is: <br>" Response.Write Mailer.Response else Response.redirect("Tak.asp?ID=1") end if
Set Mailer = nothing
%>
Synes godt om
Slettet bruger
27. december 2005 - 12:47#8
Jeg har fundet ud af det, så tusind tak for hjælpen, læg et svar - så får du dine point
kunne du bruge noget af det jeg skrev?. og skriver du ikke lige hvordan, bare så man kan bruge det én anden gang :-)
Synes godt om
Slettet bruger
27. december 2005 - 12:59#10
Jeg fandt et eks, jeg kunne bruge: <%
Dim myMail Dim HTML Set myMail = CreateObject("CDONTS.NewMail")
HTML = "<!DOCTYPE HTML PUBLIC""-//IETF//DTD HTML//EN"">" HTML = HTML & "<html>" HTML = HTML & "<head>" HTML = HTML & "<meta http-equiv=""Content-Type""" HTML = HTML & "content=""text/html; charset=iso-8859-1"">" HTML = HTML & "<meta name=""GENERATOR""" HTML = HTML & " content=""Microsoft Visual Studio 6.0"">" HTML = HTML & "<title>HTMLMail</title>" HTML = HTML & "</head>" HTML = HTML & "<body bgcolor=""FFFFFF""<table>" HTML = HTML & "<p><font size =""3"" face=""Arial""><strong>" HTML = HTML & "Microsoft Exchange CDONTS Example</strong></p>" HTML = HTML & "<p><font size =""2"" face=""Tahoma"">" HTML = HTML & "CDO for NTS allows an easy way to send mail.<br>" HTML = HTML & "This example shows how the content can be.... " HTML = HTML & "<strong>" HTML = HTML & request.form("nr") HTML = HTML & "</strong>" HTML = HTML & "<br> an HTML page<br>" HTML = HTML & "which allows you to send rich text and" HTML = HTML & "inline graphics.</p> " HTML = HTML & "</body>" HTML = HTML & "</html>"
myMail.From="" myMail.To="" myMail.Subject="Dette er en test" myMail.BodyFormat=0 myMail.MailFormat=0 myMail.Body=HTML myMail.Send set mymail=nothing Response.Write "Message Sent" %>
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.