Showing posts with label super. Show all posts
Showing posts with label super. Show all posts

Saturday, March 24, 2012

Super Annoying ! Character in my HTML Email!!

I have a web form that allows emailing of a predefined HTML body. I have tried different formatting and deleting of certain text, but when the Email is received, there is always a '!' (exclamation mark) or two within the text.

How do I get around this annoying feature! What am I doing wrong?

Your help will be greatly appreciated.I have been perusing tons of documentation and even rewrote my code, but still nothing.

I am thinking of this: is there any way to display the contents of a HTML page on the body? Essentially, this is what I'm doing. I just had a bunch of HTML tags in my body of the mailMessage.

Your help will be greatly appreciated.
Hi,


Dim objMM As New System.Web.Mail.MailMessage
objMM.BodyFormat = Mail.MailFormat.Html

More info

HTH
shaji:

Thanks for your reply. I already have that code in my page. How can I include a URL has the whole body of the email message, that is what I am looking for.

Can anyone help?
OK -- this is what I've been noticing with my mail application. When I attach an HTML body to my MailMessage .Body section and the email retrieves email addresses from a database via a datareader, the emails themselves come back with 'garbage' displayed as random '!' marks in my text.

If I put the same HTML Body in an HTML document by itself, the format is beautiful, clean, and what I'm looking for.

So this brings me to conclude that somehow, the server is throwing in some 'garbage' into the body of my MailMessage .Body. Thus now, I have come to the conclusion that I can't alleviate this problem since it seems to be out of my hands.

I was thinking there must be a way to have the Body of the email to display the web page, i.e. that HTML document.

Please help.
Hi net123,

Try String.Replace() function.

YourMailBody.Replace("!", "")

HTH
Maybe your server is converting some caracter he does'nt understand to a "!"
Can you see a pattern on where those "!" are added ?

super simple asp question

I'm tryinh to write a restricted character into a variable and i'm not sure what the replacement is.

Basically I want to put a " inside a variable string.

like:

Body = "And he said: "blah blah blah." "

Any idea how to do that and not have the string break?

i'm going to be writing xml with asp and pulling data from a form and I know xml is really sensitive and an apostraphe over quotations won't cut it.

Thanks.

well i know for c# it is string mystring = "hello world\\". you have to use double the \

EDIT: not sure why i used \ in the example, but for a quote you do it the same way string mystring = "hello \"world\"'; giving you hello "world"


In VB.NET you simply double your quotes like so:

Dim strTest As String = "President Bush said ""No Comment"" in response to my question."


ok i'll try these, thanks for your help :)

Super weird problem

I have a really strange problem. I've implemented a website using a lot of user controls (ascx). Everything worked fine before, and it has run for months.

And today, suddenly all those user controls (scrolling messages, tabstrips, menu, etc) don't work anymore, i.e. nothing appears although there's no error message. And I do not change anything, the codes remain exactly the same as before.

The web controls (textBox, calendar, buttons, etc) on the main page (not in ascx) still work fine.

I've spent, in vain, a lot of hours trying to figure it out. Do you have an idea what's going wrong ? I really appreciate your help.

Thanks

Btw, the codes are quite long, so I won't post it here. But if you need to see a part of it, just let me know, I'll post it.> nothing appears although there's no error message.

What exactly do you mean, "nothing appears"? If you View > Source, what do you see? Have the ASCX controls not be added at all? Or have they been added but not rendered?

Also, the elements you mention as having ceased to work look as though they'd use Javascript. Even if you haven't changed the ASCX or ASPX files, have you perhaps changed an external javascript file? I once forgot to add ";" to the end of a new line of script ... and it broke myentire site!
Things always get broken when no one has changed anything :)

If truly nothing has changed, try resetting IIS, as something might be confused in there...

Most likely though, as SomeNewKid2 said, it might be possible you made a change to something and didn't think it would even affect the controls...

But I could be wrong too :)
If the site is being hosted, I would check with the hosting site that they haven't upgraded the .net framework to 1.1.