Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Hyperlink in email sent via .NET not wrapping when read as text

Posted on 2006-12-01
4
Medium Priority
?
368 Views
Last Modified: 2010-04-23
I am sending out batch emails via MailMessage in VB.NET and picking the email addresses from a databse.

The body of the Email is sent out via MailFormat.Html

I have a hyperlink in the message eg <a href="http://www.XXXXXXXXXXXXXXX">Click here</a>

The problem is that the hyperlink is about 150 characters long. If the receiver of the email views their messages in HTML the link works OK but if they view their Emails as text then the link spills over at least 2 lines and only the first line is underlined so therefore when they clck on the link it does not work as the full url is not being picked up.

Are there some extra tags I need to place in the HTML document so as that this does not happen?

0
Comment
Question by:gmbeckett
[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
  • 2
4 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 1000 total points
ID: 18052605
Hi gmbeckett,

There isn't much you can do to be honest. If the message is read as plain text then it is entirely up to the email software to handle this and has nothing to do with the html tags you may embed. For instance Microsoft Outlook has a default which splits lines at (I think) 77 characters in length. This is what is causing your problem. You can only do what many websites do in this situation and put a comment in there to the effect that if the url is split over many lines it should be copied out and manually entered into a browser. Whilst this is not ideal it is the best you can do.

Tim Cottee
0
 

Author Comment

by:gmbeckett
ID: 18052734
How is then that other emails I receive in HTML but viewed as text the link does carry over 2 lines
0
 

Author Comment

by:gmbeckett
ID: 18384514
I did have a soulution to this problem in that I created a separate aspx web page just called Em.aspx
In this page I passed just a one character string.
Depending on what character was submitted then the coding behind would redirect to whatever page was required.

eg 'A' would be directed to a certain page and 'B' would be directed to another page.

This way I kept the hyperlink to less than about 50 characters
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses

610 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