Forum Moderators: open

Message Too Old, No Replies

Need help with html email after form submission

         

spongebobsquarepants

3:59 pm on Mar 11, 2005 (gmt 0)



i have an online application form that processes an html email and send it to the HR Director. Sometimes the email will come back showing tags. (ie. <font>). if i right click on the email, and view source(in outlook), the problem is very clear. If the left bracket of a tag starts at the end of a line(ie. blah blah blah < ), then it puts a space between the left bracket and the code ( < font> ), causing it to show up in the email. does anyone have any suggestions as how to make this stop.

cmatcme

4:34 pm on Mar 11, 2005 (gmt 0)

10+ Year Member



Hello and Welcome

Have the same problem myself, one way to get rid of the <br> tag is to use Chr(13) outside the text tag:

" bla " & Chr(13) & " bla "

It would progress my work if I knew how to do that

<added> Chr() doesn't do that it displays certain characters

ie

* H & * l "

which may be ignored and treated as tags when using normal html. The asp version of &gt; &lt; &nbsp; type functions! </added>

[edited by: cmatcme at 4:54 pm (utc) on Mar. 11, 2005]

Red_Eye

4:43 pm on Mar 11, 2005 (gmt 0)

10+ Year Member



How are you generating the html for the email?

cmatcme

4:46 pm on Mar 11, 2005 (gmt 0)

10+ Year Member



I'm using variables

cbody = "<table><tr><td>" & request("visitor") & "</td></tr>"
cbody = cbody + " bla "

Is that how your doing it spongebobsquarepants?

spongebobsquarepants

6:29 pm on Mar 11, 2005 (gmt 0)



Mine is set up thissaway. ASP is pretty new to me.

Mail.Body = "<font size='3' face='Verdana'><b>PERSONAL INFORMATION</b><br><hr>" & _
"<table cellSpacing='0' cellPadding='0' border='1'>" & _
"<tr>" & _
"<td><font size='2' face='Verdana'>Social Security No. <br><b>" & _
frmSocSecNo1 & "-" & frmSocSecNo2 & "-" & frmSocSecNo3 & "</b></td>" & _
"</tr>"

cmatcme

6:49 pm on Mar 11, 2005 (gmt 0)

10+ Year Member



100th Post ¦
---------------

Just thought you should know something else:

<html><head><title>Processing...</title>


<%
If request ("email") = "@" AND request ("email") = "." Then
response.write "<meta http-equiv='Refresh' content='1;url=mailto:example@example.co.uk?From=" & request ("email") & "&Subject='New User'&Body=" & cbody & "'></head><body>"
Else
response.write " </head><body> Error X "
End If

%>

</body> </html> 

Not using JMail or other components
This gives users a chance to validate their email (if they can understand the html code in variable cbody!)

spongebobsquarepants

9:15 pm on Mar 11, 2005 (gmt 0)



so basically what you're tellling me is that you don't know? or did i just not read deep enough into it to figure it out?

cmatcme

9:05 am on Mar 12, 2005 (gmt 0)

10+ Year Member



I don't know and I'm sure you'll find out if you search hard enough. I receive new letters whcih are html coded so one answer may be to learn how to write an asp coded newsletter. I don't really want to look into it that deeply so I'll just remove the html from by email and use Chr(13) instead!

:)

cmatcme

2:41 pm on Mar 12, 2005 (gmt 0)

10+ Year Member



<added> Unless you're really desperate about getting it my recommendation would be to give up or use your initiative to estimate what it is </added>