As usual, I have the knowledge to create what I want, but I don't have the vocabulary to look for help when I get stuck! The price you pay for being self taught I guess. :o So I apologize if this answer is out there somewhere, but I did spend a day searching before I posted this.
I created a form that collects user info and feeds it to an ASP page that enters the info where it belongs in an email template. Everything works fine and the resulting e-mail looks great with one exception. I would like to add images and make it look more professional. Any help would be greatly appreciated.
My ASP Code is Below (I removed the content for security and readability):
<%
Dim Body
body = "<html>"
body = body + "<head>"
body = body + "<title>text</title>"
body = body + "</head>"
body = body + "<body>"
body = body + "<TABLE>"
body = body + "<TR><TD>text</TD></TR>"
body = body + "<TR><TD>text</TD></TR>"
body = body + "<TR><TD>text " + Request.Form("Promo") + " text</TD></TR>"
body = body + "<TR><TD>text</TD></TR>"
body = body + "<TR><TD>text<p></p><p></p></TD></TR>"
body = body + "<TR><TD>text</TD></TR>"
body = body + "<TR><TD>" + Request.Form("Name") + "</TD></TR>"
body = body + "<TR><TD>text</TD></TR>"
body = body + "<TR><TD>text</TD></TR>"
body = body + "<TR><TD>(" + Request.Form("Phone") + ") " + Request.Form("Phone1") + "-" + Request.Form("Phone2") +"</TD></TR>"
body = body + "<TR><TD>" + Request.Form("email") + "</TD></TR>"
body = body + "</TABLE>"
body = body + "<table>"
body = body + "<tr><td>.<p></p></td></tr>"
body = body + "<tr><td>.<p></p></td></tr>"
body = body + "<tr><td>.<p></p></td></tr>"
body = body + "</table>"
body = body + "<table>"
body = body + "<tr><td><center>text</center></td></tr>"
body = body + "<tr><td>-------------------------------------------</td></tr>"
body = body + "<tr><td><center>" + Request.Form("Name") + " - text</center></td></tr>"
body = body + "<tr><td><center>(" + Request.Form("Phone") + ") " + Request.Form("Phone1") + "-" + Request.Form("Phone2") +"<br>" + Request.Form("email") + "</center></td></tr>"
body = body + "<tr><td><center>text<br>Promo Code: " + Request.Form("Promo") + "<br>text</center></td></tr>"
body = body + "<tr><td>-------------------------------------------</font></td></tr>"
body = body + "</table>"
You already know enough HTML to place the code in the message.. do you know how to create an image?
<img src="">
07-14-2009, 04:26 PM
LauraWord
I do. I don't have any issues with the HTML. The problem is that I get an error when I try to enter an image thay way.
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/sctraining/resources/18F/BGS_Referral/confirm.asp, line 22
body = body + "<TR><TD><img src="http://a764.g.akamai.net/f/764/16742/1h/www.1800flowers.com/800f_assets/jet/website/images/flowers/banners/long_logo.gif"></TD></TR>"
---------------------------------^
07-14-2009, 04:59 PM
yamaharuss
That's because you need to double up on your quotes... do you see where your error arrow is pointing? To the first quote in your string..
body = body + "<TR><TD><img src="http://a764.g.akamai.net/f/764/16742/1h/www.1800flowers.com/800f_assets/jet/website/images/flowers/banners/long_logo.gif"></TD></TR>"
should be
body = body + "<TR><TD><img src=""http://a764.g.akamai.net/f/764/16742/1h/www.1800flowers.com/800f_assets/jet/website/images/flowers/banners/long_logo.gif""></TD></TR>"