Solved

Issue when emailing and there is a space

Posted on 2013-12-19
7
385 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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 83

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

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 …
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
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…
This video teaches users how to migrate an existing Wordpress website to a new domain.

920 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

13 Experts available now in Live!

Get 1:1 Help Now