R
Rob
Hi,
I have a form (it works fine) but what I want to do is email the form
exactly as it is with the populated information. In otherwords, I want the
email sent to look just like the form that was filled out. I was able to get
it close but the problem I am having is that the form has a table in it and
the table uses a background JPG; but for some reason image is not being
included in the email and I'm stumped as to how to get it in there where it
belongs.
Here's the code I am using in the email function/sub.....
CODE:
Set msgMail=CreateObject("CDO.Message")
msgMail.From = Request("email")
msgMail.To = "(e-mail address removed)"
msgMail.Subject = "Response To Request"
msgMail.HTMLBody = " <html><head> " & _
"<style type=""text/css"">" & _
"<!--" & _
".TextBox {border: #000000 1px inset;border-color: #000000 #000000
#000000 #000000;font-family: Arial, sans-serif;font-size: 12px;color:
#000000;}" & _
"-->" & _
"</style></head><body>" & _
"***********************************************************************************<br>" & _
"<table
style="background-image:url('table_background.jpg');background-repeat:no-repeat;font-family:Arial;font-size:10pt;font-weight:bold;color:#000000;"
width=""703"" height=""490"" border=""0"" cellpadding=""0""
cellspacing=""0"">" & _
"<tbody><tr height=""130""><td> </td></tr><tr><td align=""center"">" & _
"<table
Style=""font-family:Arial;font-size:10pt;font-weight:bold;color:#000000;""
width=""650"" border=""0"" cellpadding=""0"" cellspacing=""0""><tbody>" & _
"<tr><td align=""left"" width=""100""> First Name:</td><td align=""left"">
<input class=""TextBox"" type=""text"" id=""Fname"" name=""Fname""
size=""29"" value=""" & Request("Fname") & """ readonly
tabindex=""1""></td><td align=""left"" width=""100""> Last Name:</td><td
align=""left""> <input class=""TextBox"" type=""text"" id=""lname""
name=""lname"" size=""29"" value=""" & Request("lname") & """ readonly
tabindex=""2""></td></tr>" & _
"<tr><td align=""left"" width=""100""> Company:</td><td align=""left"">
<input class=""TextBox"" type=""text"" id=""company"" name=""company""
size=""29"" value=""" & Request("company") & """ readonly
tabindex=""3""></td><td align=""left"" width=""100""> Business
Title:</td><td align=""left""> <input class=""TextBox"" type=""text""
id=""co_title"" name=""co_title"" size=""29"" value=""" & Request("co_title")
& """ readonly tabindex=""4""></td></tr>" & _
"<tr><td align=""left"" width=""100""> Address:</td><td align=""left"">
<input class=""TextBox"" type=""text"" id=""address1"" name=""address1""
size=""29"" value=""" & Request("address1") & """ readonly
tabindex=""5""></td><td align=""left"" width=""100""> Address Cont.:</td><td
align=""left""> <input class=""TextBox"" type=""text"" id=""address2""
name=""address2"" size=""29"" value=""" & Request("address2") & """ readonly
tabindex=""6""></td></tr>" & _
"<tr><td align=""left"" width=""100""> City:</td><td align=""left"">
<input class=""TextBox"" type=""text"" id=""city"" name=""city"" size=""29""
value=""" & Request("city") & """ readonly tabindex=""7""></td><td
align=""left"" width=""100""> State:</td><td align=""left""> <input
class=""TextBox"" type=""text"" id=""state"" name=""state"" size=""29""
value=""" & Request("state") & """ readonly tabindex=""7""></td></tr>" & _
"<tr><td align=""left"" width=""100""> Zip:</td><td align=""left""> <input
class=""TextBox"" type=""text"" id=""zip"" name=""zip"" size=""29"" value="""
& Request("zip") & """ readonly tabindex=""9""></td><td align=""left""
width=""100""> Phone:</td><td align=""left""> <input class=""TextBox""
type=""text"" id=""phone"" name=""phone"" size=""29"" value=""" &
Request("phone") & """ readonly tabindex=""10""></td></tr>" & _
"<tr><td align=""left"" width=""100""> Fax:</td><td align=""left""> <input
class=""TextBox"" type=""text"" id=""fax"" name=""fax"" size=""29"" value="""
& Request("fax") & """ readonly tabindex=""11""></td><td align=""left""
width=""100""> Email:</td><td align=""left""> <input class=""TextBox""
type=""text"" id=""email"" name=""email"" size=""29"" value=""" &
Request("email") & """ readonly tabindex=""12""></td></tr>" & _
"<tr><td colspan=""4"" align=""right"" valign=""top"">" & _
"<table
Style=""font-family:Arial;font-size:10pt;font-weight:bold;color:#000000;""
width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""0""><tbody>" & _
"<tr><td align=""left"" width=""100"" valign=""top""> Comments: </td><td
align=""left""><textarea class=""TextBox"" id=""comments"" name=""comments""
cols=""83"" rows=""5"" readonly tabindex=""13"">" & Request("comments") &
"</textarea> </td></tr>" & _
"</tbody></table></td></tr></tbody></table>" & _
"<p>***********************************************************************************" & _
"<P><br>Message Sent On: " & Now() & "</body></HTML>"
msgMail.Send
Set msgMail=nothing
ALSO TRIED:
"<table background=""table_background.jpg"" width=""703"" height=""490""
border=""0"" cellpadding=""0"" cellspacing=""0"">" & _
Is there something I am missing or Is there an easier way to do this?
Thanks Much In Advance,
R
I have a form (it works fine) but what I want to do is email the form
exactly as it is with the populated information. In otherwords, I want the
email sent to look just like the form that was filled out. I was able to get
it close but the problem I am having is that the form has a table in it and
the table uses a background JPG; but for some reason image is not being
included in the email and I'm stumped as to how to get it in there where it
belongs.
Here's the code I am using in the email function/sub.....
CODE:
Set msgMail=CreateObject("CDO.Message")
msgMail.From = Request("email")
msgMail.To = "(e-mail address removed)"
msgMail.Subject = "Response To Request"
msgMail.HTMLBody = " <html><head> " & _
"<style type=""text/css"">" & _
"<!--" & _
".TextBox {border: #000000 1px inset;border-color: #000000 #000000
#000000 #000000;font-family: Arial, sans-serif;font-size: 12px;color:
#000000;}" & _
"-->" & _
"</style></head><body>" & _
"***********************************************************************************<br>" & _
"<table
style="background-image:url('table_background.jpg');background-repeat:no-repeat;font-family:Arial;font-size:10pt;font-weight:bold;color:#000000;"
width=""703"" height=""490"" border=""0"" cellpadding=""0""
cellspacing=""0"">" & _
"<tbody><tr height=""130""><td> </td></tr><tr><td align=""center"">" & _
"<table
Style=""font-family:Arial;font-size:10pt;font-weight:bold;color:#000000;""
width=""650"" border=""0"" cellpadding=""0"" cellspacing=""0""><tbody>" & _
"<tr><td align=""left"" width=""100""> First Name:</td><td align=""left"">
<input class=""TextBox"" type=""text"" id=""Fname"" name=""Fname""
size=""29"" value=""" & Request("Fname") & """ readonly
tabindex=""1""></td><td align=""left"" width=""100""> Last Name:</td><td
align=""left""> <input class=""TextBox"" type=""text"" id=""lname""
name=""lname"" size=""29"" value=""" & Request("lname") & """ readonly
tabindex=""2""></td></tr>" & _
"<tr><td align=""left"" width=""100""> Company:</td><td align=""left"">
<input class=""TextBox"" type=""text"" id=""company"" name=""company""
size=""29"" value=""" & Request("company") & """ readonly
tabindex=""3""></td><td align=""left"" width=""100""> Business
Title:</td><td align=""left""> <input class=""TextBox"" type=""text""
id=""co_title"" name=""co_title"" size=""29"" value=""" & Request("co_title")
& """ readonly tabindex=""4""></td></tr>" & _
"<tr><td align=""left"" width=""100""> Address:</td><td align=""left"">
<input class=""TextBox"" type=""text"" id=""address1"" name=""address1""
size=""29"" value=""" & Request("address1") & """ readonly
tabindex=""5""></td><td align=""left"" width=""100""> Address Cont.:</td><td
align=""left""> <input class=""TextBox"" type=""text"" id=""address2""
name=""address2"" size=""29"" value=""" & Request("address2") & """ readonly
tabindex=""6""></td></tr>" & _
"<tr><td align=""left"" width=""100""> City:</td><td align=""left"">
<input class=""TextBox"" type=""text"" id=""city"" name=""city"" size=""29""
value=""" & Request("city") & """ readonly tabindex=""7""></td><td
align=""left"" width=""100""> State:</td><td align=""left""> <input
class=""TextBox"" type=""text"" id=""state"" name=""state"" size=""29""
value=""" & Request("state") & """ readonly tabindex=""7""></td></tr>" & _
"<tr><td align=""left"" width=""100""> Zip:</td><td align=""left""> <input
class=""TextBox"" type=""text"" id=""zip"" name=""zip"" size=""29"" value="""
& Request("zip") & """ readonly tabindex=""9""></td><td align=""left""
width=""100""> Phone:</td><td align=""left""> <input class=""TextBox""
type=""text"" id=""phone"" name=""phone"" size=""29"" value=""" &
Request("phone") & """ readonly tabindex=""10""></td></tr>" & _
"<tr><td align=""left"" width=""100""> Fax:</td><td align=""left""> <input
class=""TextBox"" type=""text"" id=""fax"" name=""fax"" size=""29"" value="""
& Request("fax") & """ readonly tabindex=""11""></td><td align=""left""
width=""100""> Email:</td><td align=""left""> <input class=""TextBox""
type=""text"" id=""email"" name=""email"" size=""29"" value=""" &
Request("email") & """ readonly tabindex=""12""></td></tr>" & _
"<tr><td colspan=""4"" align=""right"" valign=""top"">" & _
"<table
Style=""font-family:Arial;font-size:10pt;font-weight:bold;color:#000000;""
width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""0""><tbody>" & _
"<tr><td align=""left"" width=""100"" valign=""top""> Comments: </td><td
align=""left""><textarea class=""TextBox"" id=""comments"" name=""comments""
cols=""83"" rows=""5"" readonly tabindex=""13"">" & Request("comments") &
"</textarea> </td></tr>" & _
"</tbody></table></td></tr></tbody></table>" & _
"<p>***********************************************************************************" & _
"<P><br>Message Sent On: " & Now() & "</body></HTML>"
msgMail.Send
Set msgMail=nothing
ALSO TRIED:
"<table background=""table_background.jpg"" width=""703"" height=""490""
border=""0"" cellpadding=""0"" cellspacing=""0"">" & _
Is there something I am missing or Is there an easier way to do this?
Thanks Much In Advance,
R