Solved

Issue when emailing and there is a space

Posted on 2013-12-19
7
377 Views
Last Modified: 2013-12-19
I am emailing using CDOSYS.

The subject of the email is the name of the person. First name, middle and last name.

I added:     in between each recordset value to separate it in the subject of the email, but when emailed the space shows as a question mark.

So this, which is the value of the subject:

<input name="subject" type="text" class="bodytext" id="subject" value="<%=(Casesjoin.Fields.Item("FirstNm").Value)%>&nbsp;<%=(Casesjoin.Fields.Item("LastNm").Value)%> " size="100">

Will give me this:  Joe?Doe

How can i get rid of the question mark and simply have a space ?
0
Comment
Question by:amucinobluedot
7 Comments
 
LVL 32

Assisted Solution

by:Big Monty
Big Monty earned 250 total points
ID: 39729820
have you tried with just a space?

<input name="subject" type="text" class="bodytext" id="subject" value="<%=(Casesjoin.Fields.Item("FirstNm").Value)%> <%=(Casesjoin.Fields.Item("LastNm").Value)%> " size="100">
0
 

Author Comment

by:amucinobluedot
ID: 39729941
I have, it doesn't add it. It simply puts the first and last name together.
0
 

Author Comment

by:amucinobluedot
ID: 39729948
Apparently has to do with the page header.
If I use this:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

It adds an "A"

if I use this:

It adds a "?"

???
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 32

Assisted Solution

by:Big Monty
Big Monty earned 250 total points
ID: 39729968
the code page provides encoding for certain types of languages. is this an issue that you need to be concerned about? if not you can safely remove it.
0
 
LVL 38

Assisted Solution

by:Tom Beck
Tom Beck earned 125 total points
ID: 39729994
Try using String.Format:
<input name="subject" type="text" class="bodytext" id="subject" value='<%=
String.Format( "{0 1}", Casesjoin.Fields.Item("FirstNm").Value, Casesjoin.Fields.Item("LastNm").Value %> ' size="100">

Or maybe it should be like this:
<input name="subject" type="text" class="bodytext" id="subject" value='<%=
String.Format( "{0} {1}", Casesjoin.Fields.Item("FirstNm").Value, Casesjoin.Fields.Item("LastNm").Value %> ' size="100">
0
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 125 total points
ID: 39730173
I think you need to join the first and last in a separate variable before inserting it into the <input> statement.  Last I checked, the subject line of an email is supposed to be 7-bit ASCII.  Also, the data in the input statement goes thru a couple of steps before it is put in the subject line.
<%
InputName = (Casesjoin.Fields.Item("FirstNm").Value) & " " & (Casesjoin.Fields.Item("LastNm").Value)
%>

<input name="subject" type="text" class="bodytext" id="subject" value="<%=InputName %> " size="100"> 

Open in new window

0
 

Author Closing Comment

by:amucinobluedot
ID: 39730634
Joining them sounds like the best option, thanks for everyone's help.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now