Link to home
Start Free TrialLog in
Avatar of gmbeckett
gmbeckett

asked on

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

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?

ASKER CERTIFIED SOLUTION
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gmbeckett
gmbeckett

ASKER

How is then that other emails I receive in HTML but viewed as text the link does carry over 2 lines
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