?
Solved

Is there any way I can convert characters that I'm receiving in an email message from an asp form page

Posted on 2003-03-22
5
Medium Priority
?
290 Views
Last Modified: 2010-04-17
Hi,
I'm getting the following in an email: Name=Somename&Date=9%2F23%2F2003

I'm sending this email from a form in an asp page, using CDOsys. I'm using mailStr = Request.Form, which gathers the data from the previous page.

Any idea how the email, when I receive it, can be formatted:
Name = Somename
Date = SomeDate

Thanks,
Sean
0
Comment
Question by:seanpowell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 3

Expert Comment

by:a_goat
ID: 8187731
mailStr = "Name: " & Request.form("Name") & vbCrLf & "Date: " & Request.form("date")

if it puts it all on one line, try putting:

vbCrLf = Chr(13) & Chr(10)

Just before that line.

0
 
LVL 3

Accepted Solution

by:
a_goat earned 300 total points
ID: 8187740
Oh, one more suggestion, try this:

vbCrLf = Chr(13) & Chr(10)

Message = ""
for each Key in request.form
    Message = Message & Key & ": " & Request.form(Key) & vbCrLf
next

mailStr = Message

That will list every key on a separate line with all infor formatted.
0
 

Expert Comment

by:Clarion
ID: 8187798
This should do the job:

Dim namepos, datepos
Dim namestr, datestr

namepos = instr( mailStr, "Name=" )
datepos = instr( mailStr, "Date=" )

namestr = mid( mailStr, namepos, datepos - namepos - 5)

datestr = mid( mailStr, datepos)

datestr = replace( datestr, "%2F", "-" )

Response.Write "<br>Name = " & namestr
Response.Write "<br>Date = " & datestr

Bye...
0
 
LVL 31

Author Comment

by:seanpowell
ID: 8196760
Thanks so much. Apparently it's always a good idea to have a goat around.
0
 
LVL 3

Expert Comment

by:a_goat
ID: 8196785
hell yeah it is

;-)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Simple Linear Regression
Introduction to Processes
Suggested Courses

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question