?
Solved

Issue when emailing and there is a space

Posted on 2013-12-19
7
Medium Priority
?
419 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
[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
7 Comments
 
LVL 33

Assisted Solution

by:Big Monty
Big Monty earned 1000 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
More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

 
LVL 33

Assisted Solution

by:Big Monty
Big Monty earned 1000 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 500 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 84

Accepted Solution

by:
Dave Baldwin earned 500 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

765 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