473,396 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

random ! marks in email

n8kindt
221 100+
ok, i've done quite a bit of research on my problem here. random "! " will appear in my email that i'm sending thru cdo. i've learned that this problem occurs when there are long lines of html (or rich text in my case) of 512 characters or more. i've found multiple places that state the following:

"We have identified errors occurring in Outlook where the HTML message contains a long line of code of
over 512 characters without a line break. Typical errors that occur are exclamation marks appearing in the
HTML at 512 characters on the line. To avoid this simply break up the HTML code onto separate lines so
that all systems can parse it."

my question: how do i break up the code? i've tried putting <html> and </html> around the message in smaller areas but nothing happens. i've also seen that inserting a new line by using "\n" i supposed to help but i can't get it to work.

here's my code:

PLEASE NOTE: i did not put all the [font] [size] code into this post. when i pasted it into this thread it did it all by itself. please disregard them. i am attaching the actual code i am using with this post. click here to download it.

Expand|Select|Wrap|Line Numbers
  1. .htmlbody = "<html>[font=Arial][size=3]Congratulations on your decision to join _____![/size][/font] 
  2. " & _
  3. "<div>[font=Arial][size=2] [/size][/font][font=Arial][size=2][font=Arial][size=2]Your _____ account has been activated! _____ is a powerful tool that allows you to make _____ " & _
  4. "purchases online, set up events, download important forms, blog, and much more! Your account has been created with the following information:</font>[/size][/font][/size][/font]
  5. [font=Arial][size=2][font=Arial][size=2]" & _
  6. "</div>[/size][/font][/size][/font][font=Arial][size=2][font=Arial][size=2] [/size][/font][/size][/font]
  7. [font=Arial][size=2][font=Arial][size=2] [/size][/font][/size][/font]
  8. [font=Arial][size=2][font=Arial][size=2]First Name: " & [Reports]![rptFInalizedApp]![First] & _
  9. "</div>[/size][/font][/size][/font][font=Arial][size=2][font=Arial][size=2]Last Name: " & [Reports]![rptFInalizedApp]![Last] & "[/size][/font][/size][/font]
  10. [font=Arial][size=2][font=Arial][size=2]Username/GG Email: " & _
  11. strGGemail & "</div>[/size][/font][/size][/font][font=Arial][size=2][font=Arial][size=2]Password: " & strAssignedPW & "[/size][/font][/size][/font]
  12. [font=Arial][size=2][font=Arial][size=2]Zip Code: " & [Reports]![rptFInalizedApp]![Zip] & _
  13. "</div>[/size][/font][/size][/font][font=Arial][size=2][font=Arial][size=2]Phone#: " & Left([Reports]![rptFInalizedApp]![Phone1], 14) & "[/size][/font][/size][/font]
  14. [font=Arial][size=2][font=Arial][size=2]" & _
  15. "<div> [/size][/font][/size][/font]
  16. [font=Arial][size=2][font=Arial][size=2][font=Arial][size=2]If you wish to change your password, you can do so after logging in. To login into your _____ account, please follow these instructions:[/size][/font][/size][/font][/size][/font]
  17. [font=Arial][size=2][font=Arial][size=2]" & _
  18. "<html>[/size][/font][/size][/font][font=Arial][size=2][font=Arial][size=2] [/size][/font][/size][/font]
  19. [font=Arial][size=2][font=Arial][size=2]1) Go to www._____.info either by <\\n>copying the url into your web browser (preferably Internet Explorer) " & _
  20. "or clicking on the link provided.</div>" & _
  21. "<div>[font=Arial][size=2]2) After reviewing the Corporate Policy and terms, scroll to the bottom of the page. You will now see a place to enter your username ( " & _
  22. strGGemail & " ) and password ( " & strAssignedPW & " ).</font>[/size][/font][/size][/font][/size][/font]
  23. [font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2]3) Click login. " & _
  24. "A small window should pop up and read: "Successfully Logged In!" If this does " & _
  25. "not appear, click "Logout of Site" (located below the solid pink bar) and follow the instructions listed under "Troubleshooting" on the main page.</font>[/size][/font][/size][/font][/size][/font][/size][/font]
  26. [font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2]" & _
  27. "<div>[font=Arial][size=2]4) This step is ONLY for new recruits who have not yet purchased their kits: After logging in, click the "Store" link at the top of the webpage. " & _
  28. "You will now be viewing the store. Click on "New Recruits Click HERE". <\\n>Now add BOTH "Your Kit Size(1 of 2):Product" and " & _
  29. ""<u>Your Kit Size(2 of 2): Supply" to your cart. We will not ship your order until you have purchased both.[/size][/font][/size][/font][/size][/font][/size][/font][/size][/font]
  30. [font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2]" & _
  31. "<div> [/size][/font][/size][/font][/size][/font][/size][/font]
  32. [font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2]If you want to change your password, click on the "Admin" link. Once the page has loaded, click "Update your login password" under " & _
  33. "the heading "Reset password".</font>[/size][/font][/size][/font][/size][/font][/size][/font][/size][/font]
  34. [font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2] [/size][/font][/size][/font][/size][/font][/size][/font][/size][/font]
  35. [font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2]Your _____ username is also an email forwarder. " & _
  36. "All emails sent to " & strGGemail & " will be forwarded to " & Email.Value & ".</font>[/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font]
  37. [font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2] [/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font]
  38. [font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2]If any of this is information " & _
  39. "is incorrect, please reply to this email address with the corrected information. </font>[/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font]
  40. [font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2] [/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font]
  41. [font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2]We look forward " & _
  42. "to receiving your orders from the WebStore and processing them for you. Have a blessed day!</font>[/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font]
  43. [font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2] [/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font]
  44. [font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2]_____ Webstore " & _
  45. "Support</font>[/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font]
  46. [font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2][font=Arial][size=2] [/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font][/size][/font]


and this is the output in an email:

Expand|Select|Wrap|Line Numbers
  1. Congratulations on your decision to join _____!
  2.  
  3. Your _____ account has been activated! _____ is a powerful tool that allows you to make _____ purchases online, set up events, download important forms, blog, and much more! Your account has been created with the following information:
  4.  
  5.  
  6. First Name: test
  7. Last Name: test
  8. Usernamel: test.test@_____.com
  9. Password: 0vq2340
  10. Zip Code: 66666
  11. Phone#: (555) 555-5555
  12.  
  13. If you wish to change your password, you can do so after logging in. To login into your _____ account, please follow these instructions:
  14.  
  15. 1) Go to www._____.info either by copying the ! url into your web browser (preferably Internet Explorer) or clicking on the link provided.
  16. 2) After reviewing the Corporate Policy and terms, scroll to the bottom of the page. You will now see a place to enter your username ( test.test@_____.com ) and password ( 0vq2340 ).
  17. 3) Click login. A small window should pop up and read: "Successfully Logged In!" If this does not appear, click "Logout of Site" (located below the solid pink bar) and follow the instructions listed under "Troubleshooting" on the main page.
  18. 4) This step is ONLY for new recruits who have not yet purchased their kits: After logging in, click the "Store" link at the top of the webpage. You will now be viewing the store. Click on "New Recruits Click HERE". Now add BOTH "Your Kit Size(1 of 2):Product"! ; and "Your Kit Size(2 of 2): Supply" to your cart. We will not ship your order until you have purchased both.
  19.  
  20. If you want to change your password, click on the "Admin" link. Once the page has loaded, click "Update your login password" under the heading "Reset password".
  21.  
  22. Your _____ username is also an email forwarder. All emails sent to test.test@_____.com will be forwarded to _____________.
  23.  
  24. If any of this is information is incorrect, please reply to this email address with the corrected information.
  25.  
  26. We look forward to receiving your orders from the WebStore and processing them for you. Have a blessed day!
  27.  
  28. _____ Webstore Support
when i look at the source code in the email itself, it looks something like this (all one line):

Expand|Select|Wrap|Line Numbers
  1.  <script>document.getElementById("MsgContainer").innerHTML='\x3cdiv\x3e\x3cfont face\x3dArial size\x3d3\x3eCongratulations on your decision to join _____\x21\x3c\x2ffont\x3e \x3c\x2fdiv\x3e\x3cdiv\x3e\x3cfont face\x3dArial size\x3d2\x3e\u00a0\x3c\x2fdiv\x3e\x3cdiv\x3e\x3cfont face\x3dArial size\x3d2\x3eYour _____ account has been act.... 
how am i supposed to make it two lines if the email client always uses one line? this seems to be a microsoft exchange server error so i'm hoping someone can help me find a solution/workaround to this problem.

thank you,
nate
Attached Files
File Type: txt htmlbody.txt (3.2 KB, 634 views)
Jun 28 '08 #1
4 1977
n8kindt
221 100+
wow i just got home and this post looks way different than my computer at work. sorry for the extra wide post. i think the new firefox kept it from appearing so wide on my other computer. and by the way, there are only two "! " in this particular email: on lines 15 and 18.
Jun 29 '08 #2
Stewart Ross
2,545 Expert Mod 2GB
Hi Nate. I reckon that when you are building your string you need to add explicit line breaks (end-of-line markers) to prevent your string being seen as one long block of characters exceeding 512 characters per line. The guidance you have found on the error points the way.

A line break is what is placed in text when you press the enter key in a text editor. It is a carriage return/line feed combination which is an explicit end-of-line marker. There is a pre-defined VBA Long constant for this - vbCrLf - which is the equivalent of the two ASCII control characters in one value.

To use it within your text just concatenate it where you want a new line to start:
Expand|Select|Wrap|Line Numbers
  1. yourmessage = yourmessage & "more joining instructions." & vbCrLf & "And on a new line..." & vbCrLf & "Starting the next line..." & ...
-Stewart
Jun 29 '08 #3
n8kindt
221 100+
Hi Nate. I reckon that when you are building your string you need to add explicit line breaks (end-of-line markers) to prevent your string being seen as one long block of characters exceeding 512 characters per line. The guidance you have found on the error points the way.

A line break is what is placed in text when you press the enter key in a text editor. It is a carriage return/line feed combination which is an explicit end-of-line marker. There is a pre-defined VBA Long constant for this - vbCrLf - which is the equivalent of the two ASCII control characters in one value.

To use it within your text just concatenate it where you want a new line to start:
Expand|Select|Wrap|Line Numbers
  1. yourmessage = yourmessage & "more joining instructions." & vbCrLf & "And on a new line..." & vbCrLf & "Starting the next line..." & ...
-Stewart
thanks, Stewart! that did the trick. out of curiousity, when you say it is the equivalent of the two ASCII control characters are you referring to chr(10) and chr(13)? THANKS again!

--nate
Jun 29 '08 #4
Stewart Ross
2,545 Expert Mod 2GB
Hi Nate. Yes, vbCrLf is equivalent to the two ASCII control characters represented in a string as Chr(13) (Carriage Return) and Chr(10) (Line Feed).

-Stewart
Jun 29 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Bill | last post by:
Hello, If I type the following code directly into the interpreter, it works. If I run it from a script, it generates the following error. Can someone help? Thanks! ------------------------ ...
10
by: Virus | last post by:
Ok well what I am trying to do is have 1.) the background color to change randomly with 5 different colors.(change on page load) 2,) 10 different quotes randomly fadeing in and out in random...
63
by: Tristan Miller | last post by:
Greetings. Do any popular browsers correctly support <q>, at least for Western languages? I've noticed that Mozilla uses the standard English double-quote character, ", regardless of the lang...
9
by: Wayfarer | last post by:
Hi, I've been developing in Firebird, so I didn't notice this until today. When I use the <q> tag, IE 6 doesn't put quotes around the quotation. I tried specifically doing it in a stylesheet: ...
25
by: JNY | last post by:
I am using random to generate random numbers, thus: int x,y; for (y = 0;y < 5;y++) { x = random(50); cout << x; }
9
by: John Stivenson | last post by:
I'm using PHP 4.3.10 & MySQL 4.1.9. When I read UTF-8 string from database and echo it to the page I get only question marks. The number of question marks is equal to the real length of the...
13
by: porterboy76 | last post by:
If you only use a 32 bit seed for a random number generator, does that mean you can only ever produce a maximum of 2^32 (approx 4 billion) different sequences? What about the Mersenne Twister,...
2
by: RYAN1214 | last post by:
How can I use this random password code, and then insert the password into email which is sent to the user after the registration has been finished? thx <html> <head> <title>Javascript:...
0
by: Tatter | last post by:
I have searched the internet and all of TheScripts, and apparently I'm the first person in the world to ever have this problem, or maybe just the last to figure out what was causing it. All my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.